Display original code in shared mutator error message
This commit is contained in:
parent
77fe909b6e
commit
c4ce08e3b8
1 changed files with 2 additions and 1 deletions
|
@ -65,6 +65,7 @@ shared_examples_for 'a mutator' do
|
|||
end
|
||||
|
||||
it 'generates the expected mutations' do
|
||||
|
||||
generated = subject.map { |node| Subject.new(node) }
|
||||
|
||||
missing = expected_mutations - generated
|
||||
|
@ -82,7 +83,7 @@ shared_examples_for 'a mutator' do
|
|||
message.concat(unexpected)
|
||||
end
|
||||
|
||||
fail message.join("\n-----\n") if message.any?
|
||||
fail "Original:\n#{generate(node)}\n-----\n#{message.join("\n-----\n")}" if message.any?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue