Skip to content

Instantly share code, notes, and snippets.

@DCarper
Created February 25, 2011 16:59
Show Gist options
  • Select an option

  • Save DCarper/844090 to your computer and use it in GitHub Desktop.

Select an option

Save DCarper/844090 to your computer and use it in GitHub Desktop.
Spec::Runner.configure do |config|
config.mock_with :mocha
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment