Sha256: 0ceaefb45f24e9e8563bf5acf0db30fb5595525fdd9a4223e1af5d9b30b0dfa7

Contents?: true

Size: 972 Bytes

Versions: 3

Compression:

Stored size: 972 Bytes

Contents

# frozen_string_literal: true

require File.expand_path('../../test_helper', File.dirname(__FILE__))

class HTMLReportTest < Minitest::Test
  REDIS_STORAGE_FORMAT_VERSION = Coverband::Adapters::RedisStore::REDIS_STORAGE_FORMAT_VERSION

  def setup
    super
    @redis = Redis.new
    @store = Coverband::Adapters::RedisStore.new(@redis)
    @store.clear!
  end

  test 'report data' do
    Coverband.configure do |config|
      config.reporter            = 'std_out'
      config.store               = @store
      config.reporting_frequency = 100.0
    end
    Coverband.configuration.logger.stubs('info')
    mock_file_hash
    Coverband.configuration
             .expects(:current_root)
             .at_least_once
             .returns('app_path')
    @store.send(:save_report, basic_coverage)

    report = Coverband::Reporters::ConsoleReport.report(@store)[:merged]
    expected = { './dog.rb' => [0, 1, 2] }
    assert_equal(expected.keys, report.keys)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coverband-4.2.0 test/coverband/reporters/console_test.rb
coverband-4.2.0.rc3 test/coverband/reporters/console_test.rb
coverband-4.2.0.rc2 test/coverband/reporters/console_test.rb