Add specification of chain matcher .build
This commit is contained in:
parent
d827dc4543
commit
aa96b1d978
1 changed files with 14 additions and 0 deletions
|
@ -43,4 +43,18 @@ describe Mutant::Matcher::Chain do
|
|||
it_should_behave_like 'an idempotent method'
|
||||
end
|
||||
|
||||
describe '.build' do
|
||||
subject { described_class.build(matchers) }
|
||||
|
||||
context 'when one matcher given' do
|
||||
let(:matchers) { [double('Matcher A')] }
|
||||
it { should be(matchers.first) }
|
||||
end
|
||||
|
||||
context 'when matchers given' do
|
||||
let(:matchers) { [double('Matcher A'), double('Matcher B')] }
|
||||
it { should eql(described_class.new(matchers)) }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue