Skip to content

Instantly share code, notes, and snippets.

@JonRowe
Last active August 29, 2015 13:57
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save JonRowe/9365893 to your computer and use it in GitHub Desktop.
Delay the slow things!
# An example used to segregate DB loading to those specs requiring it only.
RSpec.configure do |config|
config.include DBHelper::DB, db: true
config.include DSL::Setup, db: true
config.before(:all, db: true) do
DBHelper.load!
end
config.before(:each, db: true) do
DatabaseCleaner.start
end
config.after(:each, db: true) do
DatabaseCleaner.clean
end
end
RSpec.configure do |c|
c.before :all, :integration do
require 'slow_things'
end
c.include SlowHelpers, :integration
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment