Add dig mutation to meta

Adding these descriptions to mutant's meta specification
before adding the mutation so that the following diff
makes it more clear what changed
This commit is contained in:
John Backus 2016-02-06 16:06:54 -08:00
parent 0bf3ae6d5d
commit 380913d32d

View file

@ -251,6 +251,41 @@ Mutant::Meta::Example.add do
mutation 'foo.values_at'
end
Mutant::Meta::Example.add do
source 'foo.dig(a, b)'
singleton_mutations
mutation 'foo'
mutation 'self.dig(a, b)'
mutation 'foo.dig(a)'
mutation 'foo.dig(b)'
mutation 'foo.dig(nil, b)'
mutation 'foo.dig(self, b)'
mutation 'foo.dig(a, nil)'
mutation 'foo.dig(a, self)'
mutation 'foo.dig'
end
Mutant::Meta::Example.add do
source 'foo.dig(a)'
singleton_mutations
mutation 'foo'
mutation 'self.dig(a)'
mutation 'foo.dig(nil)'
mutation 'foo.dig(self)'
mutation 'foo.dig'
mutation 'a'
end
Mutant::Meta::Example.add do
source 'foo.dig'
singleton_mutations
mutation 'foo'
mutation 'self.dig'
end
Mutant::Meta::Example.add do
source 'foo.__send__(bar)'