Reputation: 480
I am using the paperclip gem to upload images.
I have a test that looks like this;
describe Person do
it { should have_attached_file(:image_one) }
end
and in my models I have the following code
class Person < ActiveRecord::Base
attr_accessible :first_name, :last_name, :gender, :story, :image_one
has_attached_file :image_one
end
and the test is still failing.
I also have the following in my spec_helper file
require 'paperclip/matchers'
config.include Paperclip::Shoulda::Matchers
Is there anything I am doing incorrectly?
Upvotes: 2
Views: 280
Reputation: 4499
For me it was test database scheme out of sync and rake db:test:load
fixed the issue.
Upvotes: 1