Permalink
Browse files

Emit vcall mutation again

  • Loading branch information...
1 parent 939e25c commit 000380c1e0a9ee38609b8e65b86d121fea9c5369 Markus Schirp committed Dec 6, 2012
Showing with 6 additions and 7 deletions.
  1. +0 −2 .rspec
  2. +0 −1 lib/mutant/mutator/call.rb
  3. +6 −4 spec/shared/mutator_behavior.rb
View
2 .rspec
@@ -1,3 +1 @@
--color
---fail-fast
---backtrace
@@ -67,7 +67,6 @@ def self?
# @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?
@@ -26,11 +26,13 @@
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

0 comments on commit 000380c

Please sign in to comment.