Fix rubocop reported issues
It will take ages till my brain produces 1.9 style syntax :D
This commit is contained in:
parent
7bbe86ff95
commit
49b09eeeac
4 changed files with 13 additions and 11 deletions
|
@ -145,7 +145,6 @@ module Mutant
|
|||
|
||||
private
|
||||
|
||||
|
||||
# Add cli options
|
||||
#
|
||||
# @return [undefined]
|
||||
|
|
|
@ -10,21 +10,24 @@ describe Mutant, 'rspec integration' do
|
|||
end
|
||||
end
|
||||
|
||||
let(:base_cmd) { 'bundle exec mutant -I lib --require test_app --rspec' }
|
||||
|
||||
specify 'it allows to kill mutations' do
|
||||
Kernel.system('bundle exec mutant -I lib --require test_app --rspec ::TestApp::Literal#string').should be(true)
|
||||
Kernel.system("#{base_cmd} ::TestApp::Literal#string').should be(true)")
|
||||
end
|
||||
|
||||
specify 'it allows to exclude mutations' do
|
||||
Kernel.system('bundle exec mutant -I lib --require test_app --rspec ::TestApp::Literal#string --ignore-subject ::TestApp::Literal#uncovered_string').should be(true)
|
||||
cli = "#{base_cmd} ::TestApp::Literal#string --ignore-subject ::TestApp::Literal#uncovered_string"
|
||||
Kernel.system(cli).should be(true)
|
||||
end
|
||||
|
||||
specify 'fails to kill mutations when they are not covered' do
|
||||
cli = 'bundle exec mutant -I lib --require test_app --rspec ::TestApp::Literal#uncovered_string'
|
||||
cli = "#{base_cmd} ::TestApp::Literal#uncovered_string"
|
||||
Kernel.system(cli).should be(false)
|
||||
end
|
||||
|
||||
specify 'fails when some mutations are not covered' do
|
||||
cli = 'bundle exec mutant -I lib --require test_app --rspec ::TestApp::Literal'
|
||||
cli = "#{base_cmd} ::TestApp::Literal"
|
||||
Kernel.system(cli).should be(false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe Mutant::Mutation do
|
|||
|
||||
let(:class_under_test) { Class.new(described_class) }
|
||||
let(:object) { class_under_test.new(mutation_subject, Mutant::NodeHelpers::N_NIL) }
|
||||
let(:mutation_subject) { double('Subject', :identification => 'subject', :source => 'original') }
|
||||
let(:mutation_subject) { double('Subject', identification: 'subject', source: 'original') }
|
||||
let(:node) { double('Node') }
|
||||
|
||||
describe '#code' do
|
||||
|
|
|
@ -12,22 +12,22 @@ describe Mutant::Subject do
|
|||
let(:object) { class_under_test.new(context, node) }
|
||||
|
||||
let(:node) do
|
||||
double('Node', :location => location)
|
||||
double('Node', location: location)
|
||||
end
|
||||
|
||||
let(:location) do
|
||||
double('Location', :expression => expression)
|
||||
double('Location', expression: expression)
|
||||
end
|
||||
|
||||
let(:expression) do
|
||||
double('Expression', :line => 'source_line')
|
||||
double('Expression', line: 'source_line')
|
||||
end
|
||||
|
||||
let(:context) do
|
||||
double(
|
||||
'Context',
|
||||
:source_path => 'source_path',
|
||||
:source_line => 'source_line',
|
||||
source_path: 'source_path',
|
||||
source_line: 'source_line',
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue