How do you load Machinist's blueprints when using Spork?
Gems:
- mongoid (2.0.0.rc.6)
- capybara (0.4.1.1)
- steak (1.1.0)
- spork (0.9.0.rc2)
- rspec (2.4.0)
- machinist (2.0.0.beta2)
I get this error in every acceptance test:
Machinist::NoBlueprintError:
No master blueprint defined for class School
All test fail, because it doesn't find any blueprint. I some of these errors on V2(I still get a couple of No master blueprint..), but I get another error too:
Professor Create a new professor
Failure/Error: click_link("Profesores")
RangeError:
0x000000821461e4 is recycled object
I got config.cache_classes = false in test environment for this one.
Both spec_helper versions:
Just to rule out the obvious have you included something like this in your application.rb file:
Also have you set up your blueprints files in:
and made sure you've included:
in the top of your blueprints.
Also just on another note for when you get it up and running. Machinist caches a lot of objects to make it run faster, but it may occasionally trip you up when constantly trying to clear out the database. If you run into problems you can turn off Machinists caching by adding this to your config/environments/test.rb file: