Fix coverage of Mutant::AST namespace

This commit is contained in:
Markus Schirp 2016-01-09 21:33:06 +00:00
parent 6d8f28e1cf
commit 68e485e0e3

View file

@ -42,10 +42,20 @@ RSpec.describe Mutant::AST::NamedChildren do
end end
describe '#bar' do describe '#bar' do
context 'when node is present' do
it 'returns named child bar' do it 'returns named child bar' do
expect(instance.bar).to be(node_bar) expect(instance.bar).to be(node_bar)
end end
end end
context 'when node is NOT present' do
let(:node) { s(:node, node_foo) }
it 'returns nil' do
expect(instance.bar).to be(nil)
end
end
end
end end
end end
end end