spec/unit/mutest/cli_spec.rb in mutest-0.0.6 vs spec/unit/mutest/cli_spec.rb in mutest-0.0.7
- old
+ new
@@ -83,30 +83,30 @@
context 'with unknown flag' do
let(:flags) { %w[--invalid] }
let(:expected_message) { 'invalid option: --invalid' }
- it_should_behave_like 'an invalid cli run'
+ it_behaves_like 'an invalid cli run'
end
context 'with unknown option' do
let(:flags) { %w[--invalid Foo] }
let(:expected_message) { 'invalid option: --invalid' }
- it_should_behave_like 'an invalid cli run'
+ it_behaves_like 'an invalid cli run'
end
context 'with include help flag' do
let(:flags) { %w[--help] }
before do
expect($stdout).to receive(:puts).with(expected_message)
expect(Kernel).to receive(:exit)
end
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
let(:expected_message) do
strip_indent(<<-MESSAGE)
usage: mutest [options] MATCH_EXPRESSION ...
Environment:
@@ -127,11 +127,11 @@
end
context 'with include flag' do
let(:flags) { %w[--include foo] }
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
it 'configures includes' do
expect(subject.config.includes).to eql(%w[foo])
end
end
@@ -145,11 +145,11 @@
expect(Mutest::Config::DEFAULT.requirer).to receive(:require)
.with('mutest/integration/rspec')
.and_call_original
end
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
end
context 'when specifying the default null integration explicitely' do
let(:flags) { %w[--use null] }
let(:expected_integration) { Mutest::Integration::Null }
@@ -158,11 +158,11 @@
expect(Mutest::Config::DEFAULT.requirer).to receive(:require)
.with('mutest/integration/null')
.and_call_original
end
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
end
context 'when integration does NOT exist' do
let(:flags) { %w[--use other] }
@@ -181,27 +181,27 @@
before do
expect(Kernel).to receive(:exit)
expect($stdout).to receive(:puts).with("mutest-#{Mutest::VERSION}")
end
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
end
context 'with jobs flag' do
let(:flags) { %w[--jobs 0] }
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
it 'configures expected coverage' do
expect(subject.config.jobs).to be(0)
end
end
context 'with require flags' do
let(:flags) { %w[--require foo --require bar] }
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
it 'configures requires' do
expect(subject.config.requires).to eql(%w[foo bar])
end
end
@@ -221,36 +221,36 @@
)
]
)
end
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
end
context 'with subject-ignore flag' do
let(:flags) { %w[--ignore-subject Foo::Bar] }
let(:expected_matcher_config) do
default_matcher_config.with(ignore_expressions: [parse_expression('Foo::Bar')])
end
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
end
context 'with fail-fast flag' do
let(:flags) { %w[--fail-fast] }
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
it 'sets the fail fast option' do
expect(subject.config.fail_fast).to be(true)
end
end
context 'with zombie flag' do
let(:flags) { %w[--zombie] }
- it_should_behave_like 'a cli parser'
+ it_behaves_like 'a cli parser'
it 'sets the zombie option' do
expect(subject.config.zombie).to be(true)
end
end