Last active
August 29, 2015 13:57
-
-
Save JonRowe/9365893 to your computer and use it in GitHub Desktop.
Delay the slow things!
This file contains 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
# 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 |
This file contains 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
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