Markus Schirp
Markus Schirp
The generic mutator may take out the numblock lvars, which would turn the node into a not numblock anymore. The solution will require to scan the generated node for numblock...
People usually do not want this: ``` [nil].one? # false ``` And if they want it they should provide evidence, in form of a test.
``` describe '#@-' do it 'turns positive value into a negative' do expect(-value({ amount: 10 })).to have_attributes(amount: -10) end end ``` This crashes the method name parser where it should...
``` NoMethodError: undefined method `captures' for nil:NilClass .gem/ruby/2.7.3/gems/mutant-rspec-0.10.32/lib/mutant/integration/rspec.rb:108:in `parse_metadata' .gem/ruby/2.7.3/gems/mutant-rspec-0.10.32/lib/mutant/integration/rspec.rb:93:in `parse_example' .gem/ruby/2.7.3/gems/mutant-rspec-0.10.32/lib/mutant/integration/rspec.rb:78:in `block in all_tests_index ``` Can be triggered from: ``` RSpec.specify do # ... end ```
Example: ``` resource = aquire begin use(resource) ensure release(resource) end ``` to: ``` use(resource).tap do release(resource) end ``` This mutation forces to specify the resource release actually is executed in...
These cases should not reach the isolation/insertion phase and reported separately.