test/test_helper.rb in coverband-6.1.2 vs test/test_helper.rb in coverband-6.1.3

- old
+ new

@@ -38,11 +38,11 @@ require "spy/integration" require_relative "unique_files" $VERBOSE = original_verbosity -unless ENV["ONESHOT"] || ENV["SIMULATE_ONESHOT"] || $SKIP_SIMPLECOV +unless ENV["ONESHOT"] || $SKIP_SIMPLECOV SimpleCov.formatter = Coveralls::SimpleCov::Formatter SimpleCov.start do add_filter "test/forked" end @@ -87,12 +87,15 @@ TEST_COVERAGE_FILE = "/tmp/fake_file.json" $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib")) $LOAD_PATH.unshift(File.dirname(__FILE__)) -Mocha::Configuration.prevent(:stubbing_method_unnecessarily) -Mocha::Configuration.prevent(:stubbing_non_existent_method) +Mocha.configure do |c| + c.stubbing_method_unnecessarily = :prevent + c.stubbing_method_on_non_mock_object = :allow + c.stubbing_method_on_nil = :prevent +end def test(name, &block) test_name = :"test_#{name.gsub(/\s+/, "_")}" defined = begin instance_method(test_name) @@ -118,9 +121,13 @@ [0, 1, 2] end def basic_coverage {"app_path/dog.rb" => example_line} +end + +def increased_basic_coverage + {"app_path/dog.rb" => [0, 2, 6]} end def basic_coverage_full_path {basic_coverage_file_full_path => example_line} end