From 8212585a53d0a2bdac6cee493bf0754e99e4d41b Mon Sep 17 00:00:00 2001 From: John Backus Date: Sat, 31 Oct 2015 21:17:37 -0700 Subject: [PATCH] Add limitations examples for methods in closures --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index c60b5ea0..4ab02b3d 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,34 @@ To mutation test Rails models with rspec comment out ```require 'rspec/autorun'` RAILS_ENV=test bundle exec mutant -r ./config/environment --use rspec User ``` +Limitations +----------- + +Mutant cannot emit mutations for... + +* methods defined within a closure. For example, methods defined using `module_eval`, `class_eval`, + `define_method`, or `define_singleton_method`: + + ```ruby + class Example + class_eval do + def example1 + end + end + + module_eval do + def example2 + end + end + + define_method(:example3) do + end + + define_singleton_method(:example4) do + end + end + ``` + Mutation-Operators: -------------------