Sha256: 6786796e1285d4f6f4d6d0a2fda51cf14458c8ffa436c9a37b03f656b59cf6fd

Contents?: true

Size: 864 Bytes

Versions: 5

Compression:

Stored size: 864 Bytes

Contents

require "spec_helper"

describe TestNotifier::Stats, "MiniTest" do
  subject(:stats) { TestNotifier::Stats.new(:minitest) }

  it "returns success message" do
    stats.options = { :count => 10, :assertions => 20 }
    expect(stats.message).to eql("10 tests, 20 assertions")
  end

  it "message with failing examples" do
    stats.options = { :count => 10, :assertions => 20, :failures => 5 }
    expect(stats.message).to eql("10 tests, 20 assertions, 5 failed")
  end

  it "message with error examples" do
    stats.options = { :count => 10, :assertions => 20, :errors => 5 }
    expect(stats.message).to eql("10 tests, 20 assertions, 5 errors")
  end

  it "message with all types" do
    stats.options = { :count => 6, :failures => 2, :errors => 3, :assertions => 20 }
    expect(stats.message).to eql("6 tests, 20 assertions, 2 failed, 3 errors")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
test_notifier-2.0.3 spec/stats/minitest_spec.rb
test_notifier-2.0.2 spec/stats/minitest_spec.rb
test_notifier-2.0.1 spec/stats/minitest_spec.rb
test_notifier-2.0.0 spec/stats/minitest_spec.rb
test_notifier-1.0.1 spec/stats/minitest_spec.rb