Groups
Groups
Sign in
Groups
Groups
factory_girl
Conversations
About
Send feedback
Help
paperclip_fixture + FactoryGirl
60 views
Skip to first unread message
Claudio Poli
unread,
Feb 13, 2012, 5:39:33 AM
2/13/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to factory_girl
Using RSpec:
FactoryGirl.define do
factory :user do
avatar { paperclip_fixture("user", "avatar", "png") }
undefined method `paperclip_fixture' for #<User:0x007f819ea7a748>
Can anyone explain what's the correct syntax for recent versions of
FactoryGirl please?
# spec/support/paperclip.rb
require "paperclip/matchers"
RSpec.configure do |config|
config.include Paperclip::Shoulda::Matchers
end
# spec/spec_helper.rb
Dir[Rails.root.join("spec/support/*.rb")].each { |f| require f }
Reply all
Reply to author
Forward
0 new messages