Make tests pass on both RSpec 2 and 3

This commit is contained in:
Andrey Savchenko 2014-02-17 04:04:19 +02:00
parent 6405c6532f
commit b60fb47fd1
3 changed files with 6 additions and 6 deletions

View file

@ -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)

View file

@ -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

View file

@ -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