Skip to content

Instantly share code, notes, and snippets.

@ericsaboia
Created May 27, 2011 14:22
Show Gist options
  • Save ericsaboia/995341 to your computer and use it in GitHub Desktop.
Save ericsaboia/995341 to your computer and use it in GitHub Desktop.
Hack for speedup rspec tests with heavy factories
#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