Merge pull request #473 from backus/feature/add-limitations-to-readme
Add limitations section to README
This commit is contained in:
commit
7436c6e575
1 changed files with 48 additions and 0 deletions
48
README.md
48
README.md
|
@ -73,6 +73,54 @@ 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
|
||||
```
|
||||
|
||||
* singleton methods not defined on a constant or `self`
|
||||
|
||||
```ruby
|
||||
class Foo
|
||||
def self.bar; end # ok
|
||||
def Foo.baz; end # ok
|
||||
|
||||
myself = self
|
||||
def myself.qux; end # cannot mutate
|
||||
end
|
||||
```
|
||||
|
||||
* methods defined with eval:
|
||||
|
||||
```ruby
|
||||
class Foo
|
||||
class_eval('def bar; end') # cannot mutate
|
||||
end
|
||||
```
|
||||
|
||||
Mutation-Operators:
|
||||
-------------------
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue