free_mutant/meta/regex.rb
John Backus e9ed6cda59 Add ExtraSpacing cop and allow alignment
This cop will flag extra spacing which seems arbitrary. It
will not flag extra spacing used to align tokens if the same
characters appear in the same column on contiguous lines.
2016-03-19 21:25:51 -07:00

19 lines
382 B
Ruby

Mutant::Meta::Example.add do
source '/foo/'
singleton_mutations
mutation '//' # match all
mutation '/a\A/' # match nothing
end
Mutant::Meta::Example.add do
source '/#{foo.bar}n/'
singleton_mutations
mutation '//' # match all
mutation '/#{foo}n/'
mutation '/a\A/' # match nothing
mutation '/#{self.bar}n/'
mutation '/#{nil}n/'
mutation '/#{self}n/'
end