d647563055
* Avoids boot time mutation of REGISTER constant * Allows to define project specific expression parsing * Avoids custom (slow) serialization of Expression objects speeding up reporter / killer IPC * Improve specification * Improve integration API as it now finally references an object the config * Allow reproduction of syntax from Expression#syntax * Allow instantiation of Expresssion objects without generating the syntax, much nicer for most specs & internal code, avoids generating a string to parse it into an expression * Fix LSP violation in Mutant::Matcher namespace
21 lines
589 B
Ruby
21 lines
589 B
Ruby
RSpec.describe Mutant::Matcher::Compiler::SubjectPrefix do
|
|
let(:object) { described_class.new(parse_expression('Foo*')) }
|
|
|
|
let(:_subject) { double('Subject', expression: parse_expression(subject_expression)) }
|
|
|
|
describe '#call' do
|
|
subject { object.call(_subject) }
|
|
|
|
context 'when subject expression is prefixed by expression' do
|
|
let(:subject_expression) { 'Foo::Bar' }
|
|
|
|
it { should be(true) }
|
|
end
|
|
|
|
context 'when subject expression is NOT prefixed by expression' do
|
|
let(:subject_expression) { 'Bar' }
|
|
|
|
it { should be(false) }
|
|
end
|
|
end
|
|
end
|