Sha256: 7620678776421e32ed63c1246405f26a08f478ca295b7fb36977e3e4bee741a5
Contents?: true
Size: 731 Bytes
Versions: 29
Compression:
Stored size: 731 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Mutant::Mutator::Node::Literal, 'regex' do context 'literal' do let(:source) { '/foo/' } let(:mutations) do mutations = [] mutations << '//' # match all mutations << '/a\A/' # match nothing mutations << 'nil' end it_should_behave_like 'a mutator' end context 'interpolated' do let(:source) { '/#{foo.bar}n/' } let(:mutations) do mutations = [] mutations << '//' # match all mutations << '/#{foo}n/' # match all mutations << '/a\A/' # match nothing mutations << '/#{nil.bar}n/' mutations << '/#{nil}n/' mutations << 'nil' end it_should_behave_like 'a mutator' end end
Version data entries
29 entries across 29 versions & 1 rubygems