Last active
August 29, 2015 14:03
-
-
Save tdouce/1944a229937b69ef2a3c to your computer and use it in GitHub Desktop.
Part of 'Testing Rails Service Oriented Architecture' blog
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
# spec/spec_helper.rb in client | |
... | |
require 'rspec/rails' | |
require 'database_cleaner' | |
... | |
RSpec.configure do |config| | |
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