Displaying 1 result from an estimated 1 matches for "have_attached_file".
Did you mean:
has_attached_file
2010 Sep 01
1
Faking Paperclip has_attached_file with Factory girl?
...g"
user.password "foobar"
user.password_confirmation "foobar"
user.avatar_file_name "avatar"
end
My Rspec test (users_controller_spec.rb) looks like this:
it "should have a profile image" do
get :show, :id => @user
should have_attached_file(:avatar)
end
And I get the following error:
UsersController GET ''show'' should have a profile image
Failure/Error: @user = Factory(:user)
undefined method `avatar_file_name='' for #<User:0x000001037cc550>
I have followed these instructions, http://github.com/though...