spec/stats/rspec_spec.rb in test_notifier-2.0.3 vs spec/stats/rspec_spec.rb in test_notifier-2.1.0

- old
+ new

@@ -1,30 +1,32 @@ +# frozen_string_literal: true + require "spec_helper" describe TestNotifier::Stats, "RSpec" do subject(:stats) { TestNotifier::Stats.new(:rspec) } it "returns success message" do - stats.options = { :count => 10 } + 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 } + 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 } + 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 } + 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 } + 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