Add specs for mutation filter

This commit is contained in:
Markus Schirp 2013-09-08 21:58:39 +02:00
parent 8ffffa0580
commit 251fe68175
2 changed files with 18 additions and 0 deletions

View file

@ -103,6 +103,7 @@ require 'mutant/matcher/method/instance'
require 'mutant/matcher/methods'
require 'mutant/matcher/namespace'
require 'mutant/matcher/scope'
require 'mutant/matcher/filter'
require 'mutant/killer'
require 'mutant/killer/static'
require 'mutant/killer/rspec'

View file

@ -0,0 +1,17 @@
require 'spec_helper'
describe Mutant::Matcher::Filter do
let(:object) { described_class.new(matcher, predicate) }
let(:matcher) { [:foo, :bar] }
let(:predicate) { Mutant::Predicate::Attribute::Equality.new(:to_s, 'foo') }
describe '#each' do
subject { object.each { |item| yields << item } }
let(:yields) { [] }
its(:to_a) { should eql([:bar]) }
it_should_behave_like 'an #each method'
end
end