spec/unit/mutant/meta/example/dsl_spec.rb in mutant-0.8.11 vs spec/unit/mutant/meta/example/dsl_spec.rb in mutant-0.8.12

- old
+ new

@@ -74,9 +74,25 @@ singleton_mutations end end + context 'using #regexp_mutations' do + let(:expected) do + [s(:regexp, s(:regopt)), s(:regexp, s(:str, 'nomatch\\A'), s(:regopt))] + end + + let(:node) do + s(:regexp, s(:str, 'foo'), s(:regopt)) + end + + expect_example do + source '/foo/' + + regexp_mutations + end + end + context 'no definition of source' do expect_error('source not defined') do end end