spec/spec_helper.rb in grape-1.6.0 vs spec/spec_helper.rb in grape-1.6.1

- old
+ new

@@ -3,11 +3,20 @@ $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'support')) require 'grape' +require 'test_prof/recipes/rspec/let_it_be' +class NullAdapter + def begin_transaction; end + + def rollback_transaction; end +end + +TestProf::BeforeAll.adapter = NullAdapter.new + require 'rubygems' require 'bundler' Bundler.require :default, :test Dir["#{File.dirname(__FILE__)}/support/*.rb"].sort.each do |file| @@ -25,10 +34,11 @@ config.include Spec::Support::Helpers config.raise_errors_for_deprecations! config.filter_run_when_matching :focus config.warnings = true - config.before(:each) { Grape::Util::InheritableSetting.reset_global! } + config.before(:all) { Grape::Util::InheritableSetting.reset_global! } + config.before { Grape::Util::InheritableSetting.reset_global! } # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = '.rspec_status' end