I'm using paperclip-4.2.0+rspec 3.0.3 with rails 4.1.4 and wrote rspec for paperclip attachment size validation and the following problem happen
Failure/Error: it { should validate_attachment_size(:image).less_than(8.megabytes) }
NoMethodError:
undefined method `[]' for nil:NilClass
I followed the solution from How can I use Rspec to test that a model using Paperclip is validating the size of an uploaded file? but still facing this problem can anyone help me...