diff --git a/lib/mutant/constants.rb b/lib/mutant/constants.rb index e515e635..d8433c3e 100644 --- a/lib/mutant/constants.rb +++ b/lib/mutant/constants.rb @@ -64,7 +64,6 @@ module Mutant OPERATOR_METHODS = OPERATOR_EXPANSIONS.keys + INDEX_OPERATORS + UNARY_METHOD_OPERATORS - # Hopefully all types parser does generate NODE_TYPES = [ :lvasgn, :ivasgn, :cvasgn, :gvasgn, diff --git a/spec/unit/mutant/cli/class_methods/new_spec.rb b/spec/unit/mutant/cli/class_methods/new_spec.rb index c0c2cc1f..28207094 100644 --- a/spec/unit/mutant/cli/class_methods/new_spec.rb +++ b/spec/unit/mutant/cli/class_methods/new_spec.rb @@ -24,7 +24,7 @@ describe Mutant::CLI, '.new' do let(:time) { Time.now } before do - Time.stub(:now => time) + Time.stub(now: time) end # Defaults diff --git a/spec/unit/mutant/cli/class_methods/run_spec.rb b/spec/unit/mutant/cli/class_methods/run_spec.rb index 506c8b22..0ac8bd10 100644 --- a/spec/unit/mutant/cli/class_methods/run_spec.rb +++ b/spec/unit/mutant/cli/class_methods/run_spec.rb @@ -5,16 +5,16 @@ require 'spec_helper' describe Mutant::CLI, '.run' do subject { object.run(argv) } - let(:object) { described_class } - let(:argv) { double('ARGV') } - let(:attributes) { double('Options') } - let(:runner) { double('Runner', :success? => success) } - let(:config) { double('Config') } - let(:instance) { double(described_class.name, :config => config) } + let(:object) { described_class } + let(:argv) { double('ARGV') } + let(:attributes) { double('Options') } + let(:runner) { double('Runner', success?: success) } + let(:config) { double('Config') } + let(:instance) { double(described_class.name, config: config) } before do - described_class.stub(:new => instance) - Mutant::Runner::Config.stub(:run => runner) + described_class.stub(new: instance) + Mutant::Runner::Config.stub(run: runner) end context 'when runner is successful' do diff --git a/spec/unit/mutant/killer/rspec/class_methods/new_spec.rb b/spec/unit/mutant/killer/rspec/class_methods/new_spec.rb index c15f0e6a..964c497e 100644 --- a/spec/unit/mutant/killer/rspec/class_methods/new_spec.rb +++ b/spec/unit/mutant/killer/rspec/class_methods/new_spec.rb @@ -18,24 +18,24 @@ describe Mutant::Killer::Rspec, '.new' do let(:mutation) do double( 'Mutation', - :subject => mutation_subject, - :should_survive? => false + subject: mutation_subject, + should_survive?: false ) end let(:strategy) do double( 'Strategy', - :spec_files => ['foo'], - :error_stream => $stderr, - :output_stream => $stdout + spec_files: ['foo'], + error_stream: $stderr, + output_stream: $stdout ) end before do mutation.stub(:insert) mutation.stub(:reset) - RSpec::Core::Runner.stub(:run => exit_status) + RSpec::Core::Runner.stub(run: exit_status) end context 'when run exits zero' do diff --git a/spec/unit/mutant/killer/success_predicate_spec.rb b/spec/unit/mutant/killer/success_predicate_spec.rb index 605d81ea..d9c748ea 100644 --- a/spec/unit/mutant/killer/success_predicate_spec.rb +++ b/spec/unit/mutant/killer/success_predicate_spec.rb @@ -5,13 +5,13 @@ require 'spec_helper' describe Mutant::Killer, '#success?' do subject { object.success? } - let(:object) { class_under_test.new(strategy, mutation) } - let(:strategy) { double('Strategy') } - let(:mutation) { double('Mutation', :success? => kill_state) } - let(:kill_state) { double('Kill State') } + let(:object) { class_under_test.new(strategy, mutation) } + let(:strategy) { double('Strategy') } + let(:mutation) { double('Mutation', success?: kill_state) } + let(:kill_state) { double('Kill State') } before do - kill_state.stub(:freeze => kill_state, :dup => kill_state) + kill_state.stub(freeze: kill_state, dup: kill_state) end let(:class_under_test) do diff --git a/spec/unit/mutant/loader/eval/class_methods/run_spec.rb b/spec/unit/mutant/loader/eval/class_methods/run_spec.rb index 1ddb6966..aeb51866 100644 --- a/spec/unit/mutant/loader/eval/class_methods/run_spec.rb +++ b/spec/unit/mutant/loader/eval/class_methods/run_spec.rb @@ -11,7 +11,7 @@ describe Mutant::Loader::Eval, '.run' do let(:line) { 1 } let(:mutation_subject) do - double('Subject', :source_path => path, :source_line => line) + double('Subject', source_path: path, source_line: line) end let(:source) do diff --git a/spec/unit/mutant/matcher/namespace/each_spec.rb b/spec/unit/mutant/matcher/namespace/each_spec.rb index d8110cbe..8891db1e 100644 --- a/spec/unit/mutant/matcher/namespace/each_spec.rb +++ b/spec/unit/mutant/matcher/namespace/each_spec.rb @@ -10,10 +10,10 @@ describe Mutant::Matcher::Namespace, '#each' do let(:cache) { Mutant::Cache.new } - let(:singleton_a) { double('SingletonA', :name => 'TestApp::Literal') } - let(:singleton_b) { double('SingletonB', :name => 'TestApp::Foo') } - let(:subject_a) { double('SubjectA') } - let(:subject_b) { double('SubjectB') } + let(:singleton_a) { double('SingletonA', name: 'TestApp::Literal') } + let(:singleton_b) { double('SingletonB', name: 'TestApp::Foo') } + let(:subject_a) { double('SubjectA') } + let(:subject_b) { double('SubjectB') } before do Mutant::Matcher::Methods::Singleton.stub(:each) @@ -22,7 +22,7 @@ describe Mutant::Matcher::Namespace, '#each' do Mutant::Matcher::Methods::Instance.stub(:each) .with(cache, singleton_a) .and_yield(subject_b) - ObjectSpace.stub(:each_object => [singleton_a, singleton_b]) + ObjectSpace.stub(each_object: [singleton_a, singleton_b]) end context 'with no block' do diff --git a/spec/unit/mutant/mutator/each_spec.rb b/spec/unit/mutant/mutator/each_spec.rb index db64797e..94712f6e 100644 --- a/spec/unit/mutant/mutator/each_spec.rb +++ b/spec/unit/mutant/mutator/each_spec.rb @@ -19,7 +19,7 @@ describe Mutant::Mutator, '.each' do end before do - Mutant::Random.stub(:hex_string => random_string) + Mutant::Random.stub(hex_string: random_string) end it_should_behave_like 'a mutator' diff --git a/spec/unit/mutant/mutator/node/and_asgn/mutation_spec.rb b/spec/unit/mutant/mutator/node/and_asgn/mutation_spec.rb index b9eb2390..54adc364 100644 --- a/spec/unit/mutant/mutator/node/and_asgn/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/and_asgn/mutation_spec.rb @@ -20,7 +20,7 @@ describe Mutant::Mutator::Node::OpAsgn, 'and_asgn' do end before do - Mutant::Random.stub(:fixnum => random_fixnum, :hex_string => random_string) + Mutant::Random.stub(fixnum: random_fixnum, hex_string: random_string) end it_should_behave_like 'a mutator' diff --git a/spec/unit/mutant/mutator/node/block/mutation_spec.rb b/spec/unit/mutant/mutator/node/block/mutation_spec.rb index 2c48dd9e..e133cf89 100644 --- a/spec/unit/mutant/mutator/node/block/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/block/mutation_spec.rb @@ -26,7 +26,7 @@ describe Mutant::Mutator, 'block' do let(:source) { 'foo { |a, b| }' } before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end let(:mutations) do @@ -47,7 +47,7 @@ describe Mutant::Mutator, 'block' do context 'with block pattern args' do before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end let(:source) { 'foo { |(a, b), c| }' } diff --git a/spec/unit/mutant/mutator/node/case/mutation_spec.rb b/spec/unit/mutant/mutator/node/case/mutation_spec.rb index 6a96c3bf..2d534668 100644 --- a/spec/unit/mutant/mutator/node/case/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/case/mutation_spec.rb @@ -6,7 +6,7 @@ describe Mutant::Mutator::Node::Case do let(:random_string) { 'random' } before do - Mutant::Random.stub(:hex_string => random_string) + Mutant::Random.stub(hex_string: random_string) end context 'with multiple when branches' do diff --git a/spec/unit/mutant/mutator/node/define/mutation_spec.rb b/spec/unit/mutant/mutator/node/define/mutation_spec.rb index ac3de669..2720e3c0 100644 --- a/spec/unit/mutant/mutator/node/define/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/define/mutation_spec.rb @@ -43,7 +43,7 @@ describe Mutant::Mutator, 'def' do let(:source) { 'def foo(a, b); end' } before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end let(:mutations) do @@ -83,7 +83,7 @@ describe Mutant::Mutator, 'def' do let(:source) { 'def foo(a = true); end' } before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end let(:mutations) do @@ -127,7 +127,7 @@ describe Mutant::Mutator, 'def' do context 'define on singleton with argument' do before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end let(:source) { 'def self.foo(a, b); end' } diff --git a/spec/unit/mutant/mutator/node/dstr/mutation_spec.rb b/spec/unit/mutant/mutator/node/dstr/mutation_spec.rb index f1d29016..b47665c2 100644 --- a/spec/unit/mutant/mutator/node/dstr/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/dstr/mutation_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe Mutant::Mutator::Node::Dstr, 'dstr' do before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end let(:source) { '"foo#{bar}baz"' } diff --git a/spec/unit/mutant/mutator/node/dsym/mutation_spec.rb b/spec/unit/mutant/mutator/node/dsym/mutation_spec.rb index 1fe8f35a..4c17306b 100644 --- a/spec/unit/mutant/mutator/node/dsym/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/dsym/mutation_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe Mutant::Mutator::Node::Generic, 'dsum' do before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end let(:source) { ':"foo#{bar}baz"' } diff --git a/spec/unit/mutant/mutator/node/if/mutation_spec.rb b/spec/unit/mutant/mutator/node/if/mutation_spec.rb index 34585732..8a466af0 100644 --- a/spec/unit/mutant/mutator/node/if/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/if/mutation_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe Mutant::Mutator, 'if' do before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end context 'with if and else branches' do diff --git a/spec/unit/mutant/mutator/node/literal/fixnum_spec.rb b/spec/unit/mutant/mutator/node/literal/fixnum_spec.rb index 795fc6d0..c0d134e8 100644 --- a/spec/unit/mutant/mutator/node/literal/fixnum_spec.rb +++ b/spec/unit/mutant/mutator/node/literal/fixnum_spec.rb @@ -12,7 +12,7 @@ describe Mutant::Mutator::Node::Literal, 'fixnum' do end before do - Mutant::Random.stub(:fixnum => random_fixnum) + Mutant::Random.stub(fixnum: random_fixnum) end it_should_behave_like 'a mutator' diff --git a/spec/unit/mutant/mutator/node/literal/float_spec.rb b/spec/unit/mutant/mutator/node/literal/float_spec.rb index 4332cca8..2b9f0d04 100644 --- a/spec/unit/mutant/mutator/node/literal/float_spec.rb +++ b/spec/unit/mutant/mutator/node/literal/float_spec.rb @@ -20,7 +20,7 @@ describe Mutant::Mutator::Node::Literal, 'float' do let(:random_float) { 7.123 } before do - Mutant::Random.stub(:float => random_float) + Mutant::Random.stub(float: random_float) end it_should_behave_like 'a mutator' diff --git a/spec/unit/mutant/mutator/node/literal/range_spec.rb b/spec/unit/mutant/mutator/node/literal/range_spec.rb index 360d447f..33f8c1df 100644 --- a/spec/unit/mutant/mutator/node/literal/range_spec.rb +++ b/spec/unit/mutant/mutator/node/literal/range_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe Mutant::Mutator::Node::Literal, 'range' do before :each do - Mutant::Random.stub(:fixnum => random_fixnum) + Mutant::Random.stub(fixnum: random_fixnum) end let(:random_fixnum) { 5 } diff --git a/spec/unit/mutant/mutator/node/literal/string_spec.rb b/spec/unit/mutant/mutator/node/literal/string_spec.rb index b2fe6473..e11cb780 100644 --- a/spec/unit/mutant/mutator/node/literal/string_spec.rb +++ b/spec/unit/mutant/mutator/node/literal/string_spec.rb @@ -12,7 +12,7 @@ describe Mutant::Mutator::Node::Literal, 'string' do end before do - Mutant::Random.stub(:hex_string => random_string) + Mutant::Random.stub(hex_string: random_string) end it_should_behave_like 'a mutator' diff --git a/spec/unit/mutant/mutator/node/literal/symbol_spec.rb b/spec/unit/mutant/mutator/node/literal/symbol_spec.rb index 0acc656f..f4ee7874 100644 --- a/spec/unit/mutant/mutator/node/literal/symbol_spec.rb +++ b/spec/unit/mutant/mutator/node/literal/symbol_spec.rb @@ -12,7 +12,7 @@ describe Mutant::Mutator::Node::Literal, 'symbol' do end before do - Mutant::Random.stub(:hex_string => random_string) + Mutant::Random.stub(hex_string: random_string) end it_should_behave_like 'a mutator' diff --git a/spec/unit/mutant/mutator/node/named_value/access/mutation_spec.rb b/spec/unit/mutant/mutator/node/named_value/access/mutation_spec.rb index 18c9cc77..3b3a0fb8 100644 --- a/spec/unit/mutant/mutator/node/named_value/access/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/named_value/access/mutation_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe Mutant::Mutator::Node::NamedValue::Access, 'mutations' do before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end context 'global variable' do diff --git a/spec/unit/mutant/mutator/node/named_value/constant_assignment/mutation_spec.rb b/spec/unit/mutant/mutator/node/named_value/constant_assignment/mutation_spec.rb index ceefe8c5..97aecc04 100644 --- a/spec/unit/mutant/mutator/node/named_value/constant_assignment/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/named_value/constant_assignment/mutation_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe Mutant::Mutator::Node::NamedValue::VariableAssignment, 'mutations' do before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end let(:source) { 'A = true' } diff --git a/spec/unit/mutant/mutator/node/named_value/variable_assignment/mutation_spec.rb b/spec/unit/mutant/mutator/node/named_value/variable_assignment/mutation_spec.rb index ebeed93b..044b989a 100644 --- a/spec/unit/mutant/mutator/node/named_value/variable_assignment/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/named_value/variable_assignment/mutation_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe Mutant::Mutator::Node::NamedValue::VariableAssignment, 'mutations' do before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end context 'global variable' do diff --git a/spec/unit/mutant/mutator/node/op_assgn/mutation_spec.rb b/spec/unit/mutant/mutator/node/op_assgn/mutation_spec.rb index 6f0429d1..017c5087 100644 --- a/spec/unit/mutant/mutator/node/op_assgn/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/op_assgn/mutation_spec.rb @@ -20,7 +20,7 @@ describe Mutant::Mutator::Node::Generic, 'op_asgn' do end before do - Mutant::Random.stub(:fixnum => random_fixnum) + Mutant::Random.stub(fixnum: random_fixnum) end it_should_behave_like 'a mutator' diff --git a/spec/unit/mutant/mutator/node/or_asgn/mutation_spec.rb b/spec/unit/mutant/mutator/node/or_asgn/mutation_spec.rb index 063bf6df..051daa08 100644 --- a/spec/unit/mutant/mutator/node/or_asgn/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/or_asgn/mutation_spec.rb @@ -20,7 +20,7 @@ describe Mutant::Mutator::Node::OpAsgn, 'or_asgn' do end before do - Mutant::Random.stub(:fixnum => random_fixnum, :hex_string => random_string) + Mutant::Random.stub(fixnum: random_fixnum, hex_string: random_string) end it_should_behave_like 'a mutator' diff --git a/spec/unit/mutant/mutator/node/rescue/mutation_spec.rb b/spec/unit/mutant/mutator/node/rescue/mutation_spec.rb index e59338c3..25fbf5fd 100644 --- a/spec/unit/mutant/mutator/node/rescue/mutation_spec.rb +++ b/spec/unit/mutant/mutator/node/rescue/mutation_spec.rb @@ -15,7 +15,7 @@ describe Mutant::Mutator::Node::Generic, 'rescue' do end before do - Mutant::Random.stub(:hex_string => 'random') + Mutant::Random.stub(hex_string: 'random') end pending do diff --git a/spec/unit/mutant/predicate_spec.rb b/spec/unit/mutant/predicate_spec.rb index 487ba557..a69d60dc 100644 --- a/spec/unit/mutant/predicate_spec.rb +++ b/spec/unit/mutant/predicate_spec.rb @@ -1,8 +1,8 @@ require 'spec_helper' filter_helpers = proc do - let(:input_a) { double('Input A', :foo => 'bar') } - let(:input_b) { double('Input B', :foo => 'baz') } + let(:input_a) { double('Input A', foo: 'bar') } + let(:input_b) { double('Input B', foo: 'baz') } let(:filter_a) do input_a = self.input_a diff --git a/spec/unit/mutant/runner/config/subjects_spec.rb b/spec/unit/mutant/runner/config/subjects_spec.rb index f70cc19f..fc7abe07 100644 --- a/spec/unit/mutant/runner/config/subjects_spec.rb +++ b/spec/unit/mutant/runner/config/subjects_spec.rb @@ -10,24 +10,24 @@ describe Mutant::Runner::Config, '#subjects' do let(:config) do double( 'Config', - :class => Mutant::Config, - :subjects => [subject_a, subject_b], - :strategy => strategy, - :reporter => reporter + class: Mutant::Config, + subjects: [subject_a, subject_b], + strategy: strategy, + reporter: reporter ) end - let(:reporter) { double('Reporter') } - let(:strategy) { double('Strategy') } - let(:subject_a) { double('Subject A') } - let(:subject_b) { double('Subject B') } - let(:runner_a) { double('Runner A', :stop? => stop_a) } - let(:runner_b) { double('Runner B', :stop? => stop_b) } + let(:reporter) { double('Reporter') } + let(:strategy) { double('Strategy') } + let(:subject_a) { double('Subject A') } + let(:subject_b) { double('Subject B') } + let(:runner_a) { double('Runner A', stop?: stop_a) } + let(:runner_b) { double('Runner B', stop?: stop_b) } before do strategy.stub(:setup) strategy.stub(:teardown) - reporter.stub(:report => reporter) + reporter.stub(report: reporter) Mutant::Runner.stub(:run).with(config, subject_a).and_return(runner_a) Mutant::Runner.stub(:run).with(config, subject_b).and_return(runner_b) end diff --git a/spec/unit/mutant/runner/config/success_predicate_spec.rb b/spec/unit/mutant/runner/config/success_predicate_spec.rb index 3d1df834..6df24e44 100644 --- a/spec/unit/mutant/runner/config/success_predicate_spec.rb +++ b/spec/unit/mutant/runner/config/success_predicate_spec.rb @@ -10,9 +10,9 @@ describe Mutant::Runner::Config, '#success?' do let(:config) do double( 'Config', - :reporter => reporter, - :strategy => strategy, - :subjects => [subject_a, subject_b] + reporter: reporter, + strategy: strategy, + subjects: [subject_a, subject_b] ) end @@ -22,15 +22,15 @@ describe Mutant::Runner::Config, '#success?' do let(:subject_b) { double('Subject B') } let(:runner_a) do - double('Runner A', :stop? => stop_a, :success? => success_a) + double('Runner A', stop?: stop_a, success?: success_a) end let(:runner_b) do - double('Runner B', :stop? => stop_b, :success? => success_b) + double('Runner B', stop?: stop_b, success?: success_b) end before do - reporter.stub(:report => reporter) + reporter.stub(report: reporter) strategy.stub(:setup) strategy.stub(:teardown) Mutant::Runner.stub(:run).with(config, subject_a).and_return(runner_a) diff --git a/spec/unit/mutant/runner/mutation/killer_spec.rb b/spec/unit/mutant/runner/mutation/killer_spec.rb index e7e0da13..9a402bd0 100644 --- a/spec/unit/mutant/runner/mutation/killer_spec.rb +++ b/spec/unit/mutant/runner/mutation/killer_spec.rb @@ -8,24 +8,24 @@ describe Mutant::Runner::Mutation, '#killer' do let(:config) do double( 'Config', - :fail_fast => fail_fast, - :reporter => reporter, - :strategy => strategy + fail_fast: fail_fast, + reporter: reporter, + strategy: strategy ) end - let(:reporter) { double('Reporter') } - let(:mutation) { double('Mutation', :class => Mutant::Mutation) } - let(:strategy) { double('Strategy') } - let(:killer) { double('Killer', :success? => success) } - let(:fail_fast) { false } - let(:success) { false } + let(:reporter) { double('Reporter') } + let(:mutation) { double('Mutation', class: Mutant::Mutation) } + let(:strategy) { double('Strategy') } + let(:killer) { double('Killer', success?: success) } + let(:fail_fast) { false } + let(:success) { false } subject { object.killer } before do - reporter.stub(:report => reporter) - strategy.stub(:kill => killer) + reporter.stub(report: reporter) + strategy.stub(kill: killer) end it 'should call configuration to identify strategy' do diff --git a/spec/unit/mutant/runner/subject/success_predicate_spec.rb b/spec/unit/mutant/runner/subject/success_predicate_spec.rb index b0bbd55d..5baf1ba6 100644 --- a/spec/unit/mutant/runner/subject/success_predicate_spec.rb +++ b/spec/unit/mutant/runner/subject/success_predicate_spec.rb @@ -10,26 +10,26 @@ describe Mutant::Runner::Subject, '#success?' do let(:mutation_subject) do double( 'Subject', - :class => Mutant::Subject, - :mutations => [mutation_a, mutation_b] + class: Mutant::Subject, + mutations: [mutation_a, mutation_b] ) end - let(:reporter) { double('Reporter') } - let(:config) { double('Config', :reporter => reporter) } - let(:mutation_a) { double('Mutation A') } - let(:mutation_b) { double('Mutation B') } + let(:reporter) { double('Reporter') } + let(:config) { double('Config', reporter: reporter) } + let(:mutation_a) { double('Mutation A') } + let(:mutation_b) { double('Mutation B') } let(:runner_a) do - double('Runner A', :success? => success_a, :stop? => stop_a) + double('Runner A', success?: success_a, stop?: stop_a) end let(:runner_b) do - double('Runner B', :success? => success_b, :stop? => stop_b) + double('Runner B', success?: success_b, stop?: stop_b) end before do - reporter.stub(:report => reporter) + reporter.stub(report: reporter) Mutant::Runner.stub(:run).with(config, mutation_a).and_return(runner_a) Mutant::Runner.stub(:run).with(config, mutation_b).and_return(runner_b) end diff --git a/test_app/spec/shared/method_filter_parse_behavior.rb b/test_app/spec/shared/method_filter_parse_behavior.rb index 0cddb85d..62268c4d 100644 --- a/test_app/spec/shared/method_filter_parse_behavior.rb +++ b/test_app/spec/shared/method_filter_parse_behavior.rb @@ -2,7 +2,7 @@ shared_examples_for 'a method filter parse result' do before do - expected_class.stub(:new => response) + expected_class.stub(new: response) end let(:response) { double('Response') }