Sha256: 070380a591b43ecad7c360735dea24b76ee0abfff78d1f0f2ae9a64a7863ce8f
Contents?: true
Size: 653 Bytes
Versions: 9
Compression:
Stored size: 653 Bytes
Contents
RSpec.describe Mutant::Matcher::Filter, '#call' do subject { object.call(env) } let(:object) { described_class.new(matcher, predicate) } let(:matcher) { instance_double(Mutant::Matcher) } let(:subject_a) { instance_double(Mutant::Subject) } let(:subject_b) { instance_double(Mutant::Subject) } let(:env) { instance_double(Mutant::Env) } let(:predicate) { ->(node) { node.eql?(subject_a) } } before do expect(matcher).to receive(:call) .with(env) .and_return([subject_a, subject_b]) end it 'returns subjects after filtering' do should eql([subject_a]) end end
Version data entries
9 entries across 9 versions & 1 rubygems