mutant icon indicating copy to clipboard operation
mutant copied to clipboard

Shared meta examples

Open backus opened this issue 10 years ago • 0 comments

#413 required adding the same example 9 times to meta/def.rb: diff.

It would be nice if we could specify something like subset in the example below:

Mutant::Meta::Example.add do
  source 'def foo; end'

  mutation 'def foo; raise; end'
end

Mutant::Meta::Example.add do
  source 'def foo; foo; rescue; end'
  subset 'def foo; end'

  mutation 'def foo; nil; rescue; end'
  mutation 'def foo; self; rescue; end'
  mutation 'def foo; end'
  mutation 'def foo; foo; end'
end

where subset indicates that the mutations from the first example should also show up in the second example.

backus avatar Aug 14 '15 04:08 backus