From 000380c1e0a9ee38609b8e65b86d121fea9c5369 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Thu, 6 Dec 2012 12:32:16 +0100 Subject: [PATCH] Emit vcall mutation again --- .rspec | 2 -- lib/mutant/mutator/call.rb | 1 - spec/shared/mutator_behavior.rb | 10 ++++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.rspec b/.rspec index f52ff3da..4e1e0d2f 100644 --- a/.rspec +++ b/.rspec @@ -1,3 +1 @@ --color ---fail-fast ---backtrace diff --git a/lib/mutant/mutator/call.rb b/lib/mutant/mutator/call.rb index dc127eb6..43516151 100644 --- a/lib/mutant/mutator/call.rb +++ b/lib/mutant/mutator/call.rb @@ -67,7 +67,6 @@ module Mutant # @api private # def emit_implicit_self_receiver - return; # FIXME: Edge case that is currently not very well undestood return if name == :block_given? return unless self? diff --git a/spec/shared/mutator_behavior.rb b/spec/shared/mutator_behavior.rb index f6eacd30..429a73ef 100644 --- a/spec/shared/mutator_behavior.rb +++ b/spec/shared/mutator_behavior.rb @@ -26,11 +26,13 @@ shared_examples_for 'a mutator' do end it 'generates the expected mutations' do - subject = self.subject.map(&:to_sexp).to_set + generated = self.subject.map(&:to_sexp).to_set - unless subject == expected_mutations - message = "Missing mutations: %s\nUnexpected mutations: %s" % - [expected_mutations - subject, subject - expected_mutations ].map(&:to_a).map(&:inspect) + missing = (expected_mutations - generated).to_a + unexpected = (generated - generated).to_a + + unless generated == expected_mutations + message = "Missing mutations: %s\nUnexpected mutations: %s" % [missing, unexpected].map(&:inspect) fail message end end