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,8 +42,18 @@ RSpec.describe Mutant::AST::NamedChildren do
end end
describe '#bar' do describe '#bar' do
it 'returns named child bar' do context 'when node is present' do
expect(instance.bar).to be(node_bar) it 'returns named child bar' do
expect(instance.bar).to be(node_bar)
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