diff --git a/lib/mutant/rspec/killer.rb b/lib/mutant/rspec/killer.rb index 27ac01e4..418d311e 100644 --- a/lib/mutant/rspec/killer.rb +++ b/lib/mutant/rspec/killer.rb @@ -32,7 +32,7 @@ module Mutant return false end - reporter = RSpec::Core::Reporter.new + reporter = RSpec.configuration.reporter example_groups.each do |group| return true unless group.run(reporter) diff --git a/spec/unit/mutant/cli_new_spec.rb b/spec/unit/mutant/cli_new_spec.rb index 470f6039..03ad4d4f 100644 --- a/spec/unit/mutant/cli_new_spec.rb +++ b/spec/unit/mutant/cli_new_spec.rb @@ -13,9 +13,9 @@ end shared_examples_for 'a cli parser' do subject { cli.config } - its(:strategy) { should eql(expected_strategy) } - its(:reporter) { should eql(expected_reporter) } - its(:matcher) { should eql(expected_matcher) } + it { expect(subject.strategy).to eql(expected_strategy) } + it { expect(subject.reporter).to eql(expected_reporter) } + it { expect(subject.matcher).to eql(expected_matcher) } end describe Mutant::CLI, '.new' do diff --git a/spec/unit/mutant/rspec/killer_spec.rb b/spec/unit/mutant/rspec/killer_spec.rb index 10c1363f..fa07f496 100644 --- a/spec/unit/mutant/rspec/killer_spec.rb +++ b/spec/unit/mutant/rspec/killer_spec.rb @@ -42,7 +42,7 @@ describe Mutant::Rspec::Killer, '.new' do context 'when run exits zero' do let(:exit_status) { 0 } - its(:killed?) { should be(false) } + it { expect(subject.killed?).to be(false) } it { should be_a(described_class) } end @@ -50,7 +50,7 @@ describe Mutant::Rspec::Killer, '.new' do context 'when run exits nonzero' do let(:exit_status) { 1 } - its(:killed?) { should be(true) } + it { expect(subject.killed?).to be(true) } it { should be_a(described_class) } end