spec/spec_helper.rb in adhearsion-2.3.5 vs spec/spec_helper.rb in adhearsion-2.4.0.beta1

- old
+ new

@@ -1,30 +1,18 @@ # encoding: utf-8 $testing = true -unless ENV['SKIP_RCOV'] - require 'simplecov' - require 'simplecov-rcov' - class SimpleCov::Formatter::MergedFormatter - def format(result) - SimpleCov::Formatter::HTMLFormatter.new.format(result) - SimpleCov::Formatter::RcovFormatter.new.format(result) - end - end - SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter - SimpleCov.start do - add_filter "/vendor/" - add_filter "/spec/" - end -end +require 'coveralls' +Coveralls.wear! %w{ bundler/setup active_support stringio countdownlatch + timecop adhearsion }.each { |f| require f } Thread.abort_on_exception = true @@ -37,15 +25,23 @@ config.mock_framework = :rspec config.filter_run :focus => true config.run_all_when_everything_filtered = true config.color_enabled = true + config.mock_with :rspec do |mocks| + mocks.add_stub_and_should_receive_to Celluloid::AbstractProxy, ThreadSafeArray + end + config.before :suite do Adhearsion::Logging.start Adhearsion::Logging.default_appenders, :trace, Adhearsion.config.platform.logging.formatter end config.before :each do Adhearsion.router = nil + end + + config.after :each do + Timecop.return end end Adhearsion::Events.exeption do |e| puts e.message