Add configuration instructions for RSpec timeout

This commit is contained in:
John Backus 2015-10-29 00:00:02 -07:00
parent aad1624541
commit e07442766d

View file

@ -48,6 +48,22 @@ mutant --include lib --require virtus --use rspec Virtus::Attribute.build
mutant --include lib --require virtus --use rspec Virtus::Attribute#type
```
Configuration
-------------
Occasionally mutant will produce a mutation with an infinite runtime. When this happens
mutant will look like it is running indefinitely without killing a remaining mutation. To
avoid mutations like this, consider adding a timeout around your tests. For example, in
RSpec you can add the following to your `spec_helper`:
```ruby
config.around(:each) do |example|
Timeout.timeout(5_000, &example)
end
```
which will fail specs which run for longer than 5 seconds.
Rails
-------