Fix spec code style
This commit is contained in:
parent
7813f92412
commit
25e11d87c8
4 changed files with 13 additions and 10 deletions
|
@ -24,7 +24,6 @@ describe Mutant::Matcher::Compiler do
|
|||
|
||||
let(:matcher_config) { Mutant::Matcher::Config::DEFAULT }
|
||||
|
||||
|
||||
context 'on empty config' do
|
||||
let(:attributes) { {} }
|
||||
|
||||
|
@ -54,13 +53,13 @@ describe Mutant::Matcher::Compiler do
|
|||
|
||||
let(:expected_positive_matcher) { Mutant::Matcher::Chain.new([matcher_a]) }
|
||||
|
||||
let(:expected_predicate) {
|
||||
let(:expected_predicate) do
|
||||
Morpher::Evaluator::Predicate::Negation.new(
|
||||
Morpher::Evaluator::Predicate::Boolean::Or.new([
|
||||
described_class::SubjectPrefix.new(expression_b)
|
||||
])
|
||||
)
|
||||
}
|
||||
end
|
||||
|
||||
it { should eql(expected_matcher) }
|
||||
end
|
||||
|
@ -75,11 +74,11 @@ describe Mutant::Matcher::Compiler do
|
|||
|
||||
let(:expected_positive_matcher) { Mutant::Matcher::Chain.new([matcher_a]) }
|
||||
|
||||
let(:expected_predicate) {
|
||||
let(:expected_predicate) do
|
||||
Morpher::Evaluator::Predicate::Boolean::Or.new([
|
||||
Morpher.compile(s(:eql, s(:attribute, :code), s(:static, 'foo')))
|
||||
])
|
||||
}
|
||||
end
|
||||
|
||||
it { should eql(expected_matcher) }
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ describe Mutant::Matcher::Filter do
|
|||
subject { object.each { |entry| yields << entry } }
|
||||
|
||||
let(:matcher) { [subject_a, subject_b] }
|
||||
let(:predicate) { lambda { |subject| subject.eql?(subject_a) } }
|
||||
let(:predicate) { ->(subject) { subject.eql?(subject_a) } }
|
||||
|
||||
let(:subject_a) { double('Subject A') }
|
||||
let(:subject_b) { double('Subject B') }
|
||||
|
@ -24,7 +24,6 @@ describe Mutant::Matcher::Filter do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
it 'should yield subjects' do
|
||||
expect { subject }.to change { yields }.from([]).to([subject_a])
|
||||
end
|
||||
|
|
|
@ -37,7 +37,9 @@ describe Mutant::Matcher::Method::Instance do
|
|||
|
||||
it 'does warn' do
|
||||
subject
|
||||
expect(reporter.warn_calls.last).to eql("#{method.inspect} does not have valid source location unable to emit matcher")
|
||||
expect(reporter.warn_calls.last).to(
|
||||
eql("#{method.inspect} does not have valid source location unable to emit matcher")
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
# FIXME: This is not even close to a mutation covering spec.
|
||||
describe Mutant::Runner do
|
||||
let(:object) { described_class.new(env) }
|
||||
|
||||
|
@ -14,7 +15,7 @@ describe Mutant::Runner do
|
|||
super
|
||||
end
|
||||
|
||||
def update(attributes)
|
||||
def update(_attributes)
|
||||
self
|
||||
end
|
||||
|
||||
|
@ -104,7 +105,9 @@ describe Mutant::Runner do
|
|||
its(:subject_results) { should eql(expected_subject_results) }
|
||||
|
||||
before do
|
||||
expect(Mutant::Isolation::None).to receive(:call).and_raise(Mutant::Isolation::Error.new('test-exception-message')).twice
|
||||
expect(Mutant::Isolation::None).to receive(:call)
|
||||
.twice
|
||||
.and_raise(Mutant::Isolation::Error.new('test-exception-message'))
|
||||
|
||||
expect(Mutant::Result::Test).to receive(:new).with(
|
||||
test: test_a1,
|
||||
|
|
Loading…
Add table
Reference in a new issue