rubyist / guard-rake

guard-rake runs a rake task when files change
MIT License
94 stars 32 forks source link

Doesn't play well with FactoryGirl? #17

Open jmuheim opened 12 years ago

jmuheim commented 12 years ago

When adding the gem to my Gemfile and restarting Guard, I get this:

WARNING: Global access to Rake DSL methods is deprecated.  Please include
    ...  Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method #<FactoryGirl::Declaration::Implicit:0x007fe8255310c8>#task called at /Users/josh/Documents/Work/MuheimWebdesign/tttt/spec/factories/positions.rb:5:in `block (2 levels) in <top (required)>'
WARNING: Global access to Rake DSL methods is deprecated.  Please include
    ...  Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method #<FactoryGirl::Declaration::Implicit:0x007fdb19f18370>#task called at /Users/josh/Documents/Work/MuheimWebdesign/tttt/spec/factories/positions.rb:5:in `block (2 levels) in <top (required)>'

And when running my specs (which pass withouth guard-rake), I get errors like this:

     Failure/Error: let(:position) { create :position, name: 'Read some books', :task => nil }
     ArgumentError:
       Trait not registered: class

What's happening? I think I already used guard-rake in a FactoryGirl project before when this didn't happen...