Change rspec matcher to be position independant

The ENV accumulates state in the tracing logger. Depending on the order
of tests (note --load-by random in the .rspec) the might already be
other messages traced.
This commit is contained in:
Markus Schirp 2014-07-12 22:04:43 +00:00
parent 42f279e779
commit c0e8db7ffe

View file

@ -37,7 +37,7 @@ describe Mutant::Matcher::Method::Singleton, '#each' do
it 'warns about definition on non const/self' do
subject
expect(env.config.reporter.warn_calls).to eql(['Can only match :defs on :self or :const got :lvar unable to match'])
expect(env.config.reporter.warn_calls).to include('Can only match :defs on :self or :const got :lvar unable to match')
end
end