spec/spec_helper.rb in cocaine-0.5.1 vs spec/spec_helper.rb in cocaine-0.5.2

- old
+ new

@@ -1,7 +1,7 @@ require 'rspec' -require 'mocha' +require 'mocha/api' require 'bourne' require 'cocaine' require 'timeout' require 'tempfile' require 'pry' @@ -12,6 +12,17 @@ RSpec.configure do |config| config.mock_with :mocha config.include WithExitstatus config.include StubOS + config.include UnsettingExitstatus +end + +def best_logger + if ActiveSupport.const_defined?("Logger") + ActiveSupport::Logger + elsif ActiveSupport.const_defined?("BufferedLogger") + ActiveSupport::BufferedLogger + else + Logger + end end