Sha256: 568ecafd69e0f2344bab93ed90e3f2f219788dbba4555f5507bdd38ee6bcf1ae

Contents?: true

Size: 975 Bytes

Versions: 5

Compression:

Stored size: 975 Bytes

Contents

require "spec_helper"

describe TestNotifier::Stats, "RSpec" do
  subject(:stats) { TestNotifier::Stats.new(:rspec) }

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

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

  it "returns message with pending examples" do
    stats.options = { :count => 10, :pending => 5 }
    expect(stats.message).to eql("10 examples, 5 pending")
  end

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

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