test/test_helper.rb in coverband-4.2.0.rc1 vs test/test_helper.rb in coverband-4.2.0.rc2
- old
+ new
@@ -14,18 +14,22 @@
require 'ostruct'
require 'json'
require 'redis'
require 'resque'
require 'pry-byebug'
+require_relative 'unique_files'
$VERBOSE = original_verbosity
Coveralls.wear!
module Coverband
module Test
def self.reset
- Coverband.configuration.store.clear!
+ [:eager_loading, nil].each do |type|
+ Coverband.configuration.store.type = type
+ Coverband.configuration.store.clear!
+ end
Coverband.configuration.reset
Coverband::Collectors::Coverage.instance.reset_instance
Coverband::Background.stop
end
@@ -77,27 +81,19 @@
def basic_coverage
{ 'app_path/dog.rb' => example_line }
end
-def fake_redis
- @redis ||= begin
- redis = OpenStruct.new
- redis
- end
-end
-
-def fake_coverage_report
- file_name = '/Users/danmayer/projects/hearno/script/tester.rb'
- { file_name => [1, nil, 1, 1, nil, nil, nil] }
-end
-
def source_fixture(filename)
File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', filename))
end
def test_root
File.expand_path(File.join(File.dirname(__FILE__)))
+end
+
+def store
+ Coverband.configuration.store
end
# Taken from http://stackoverflow.com/questions/4459330/how-do-i-temporarily-redirect-stderr-in-ruby
def capture_stderr
# The output stream must be an IO-like object. In this case we capture it in