Sha256: 5695d3fb82de800c62c06f3152ad7ecdc674e493a5fcda7b5a77f87721759123
Contents?: true
Size: 729 Bytes
Versions: 2
Compression:
Stored size: 729 Bytes
Contents
if defined? DatabaseCleaner RSpec.configure do |config| config.before(:suite) do DatabaseCleaner.clean_with(:truncation) end config.before(:each) do DatabaseCleaner.strategy = :transaction end config.before(:each, :js => true) do DatabaseCleaner.strategy = :truncation, { :pre_count => true } end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end end if defined? RSpec::Rails RSpec.configure do |config| config.use_transactional_fixtures = false end end else if defined? RSpec::Rails RSpec.configure do |config| config.use_transactional_fixtures = true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspectacular-0.4.0 | lib/rspectacular/plugins/database_cleaner.rb |
rspectacular-0.3.0 | lib/rspectacular/plugins/database_cleaner.rb |