Created
May 27, 2011 14:22
-
-
Save ericsaboia/995341 to your computer and use it in GitHub Desktop.
Hack for speedup rspec tests with heavy factories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#new way: | |
describe Model do | |
before(:all) do | |
@model_factory = Factory.build(:factory_model) | |
end | |
before(:each) do | |
@model = @model_factory.clone | |
end | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment