Sha256: 3c47a624983037797eb7fd529b1a1c2e2da9e03a76b0656e671c924b120f710b
Contents?: true
Size: 1.49 KB
Versions: 49
Compression:
Stored size: 1.49 KB
Contents
# frozen_string_literal: true require File.expand_path("../test_helper", File.dirname(__FILE__)) class CoverbandTest < Minitest::Test test "Coverband#start kicks off background reporting if enabled and not in rack server" do Coverband.configuration.stubs(:background_reporting_enabled).returns(true) Coverband::RackServerCheck.expects(:running?).returns(false) Coverband::Background.expects(:start) Coverband.start end test "Coverband#start delays background reporting if enabled and running in a rack server" do Coverband.configuration.stubs(:background_reporting_enabled).returns(true) Coverband::RackServerCheck.expects(:running?).returns(true) Coverband::Background.expects(:start).never Coverband.start end test "Coverband#start does not kick off background reporting if not enabled" do Coverband.configuration.stubs(:background_reporting_enabled).returns(false) Coverband::Background.expects(:start).never ::Coverband.start end test "Coverband#configured? works" do Coverband.configure assert Coverband.configured? end test "Eager load coverage block" do Coverband.eager_loading_coverage do # some code 1 + 1 end assert_equal :runtime, Coverband.configuration.store.type end test "Eager load coverage" do Coverband.eager_loading_coverage! assert_equal :eager_loading, Coverband.configuration.store.type Coverband.runtime_coverage! assert_equal :runtime, Coverband.configuration.store.type end end
Version data entries
49 entries across 49 versions & 1 rubygems