spec/spec_helper.rb in ridley-0.3.2 vs spec/spec_helper.rb in ridley-0.4.0

- old
+ new

@@ -1,10 +1,10 @@ require 'rubygems' require 'bundler' -require 'spork' +require 'chozo' -Spork.prefork do +def setup_rspec require 'rspec' require 'json_spec' require 'webmock/rspec' Dir[File.join(File.expand_path("../../spec/support/**/*.rb", __FILE__))].each { |f| require f } @@ -15,11 +15,27 @@ config.mock_with :rspec config.treat_symbols_as_metadata_keys_with_true_values = true config.filter_run focus: true config.run_all_when_everything_filtered = true + + config.before(:all) do + Ridley.logger = nil + Celluloid.logger = nil + end end end -Spork.each_run do +if mri? && ENV['CI'] != 'true' + require 'spork' + + Spork.prefork do + setup_rspec + end + + Spork.each_run do + require 'ridley' + end +else require 'ridley' + setup_rspec end