Change AlignHash rubocop preference to table

This commit is contained in:
John Backus 2016-03-19 13:51:21 -07:00
parent 7239a39dd9
commit c4dd8693cb
9 changed files with 49 additions and 45 deletions

View file

@ -155,3 +155,7 @@ IndentArray:
# My style is not supported # My style is not supported
MultilineMethodCallIndentation: MultilineMethodCallIndentation:
Enabled: false Enabled: false
# Align keys and values in a multiline hash
Style/AlignHash:
EnforcedColonStyle: table

View file

@ -61,10 +61,10 @@ module Mutant
passed = @runner.run_specs(@world.ordered_example_groups).equal?(EXIT_SUCCESS) passed = @runner.run_specs(@world.ordered_example_groups).equal?(EXIT_SUCCESS)
@output.rewind @output.rewind
Result::Test.new( Result::Test.new(
output: @output.read, output: @output.read,
passed: passed, passed: passed,
runtime: Time.now - start, runtime: Time.now - start,
tests: tests tests: tests
) )
end end

View file

@ -63,7 +63,7 @@ module Mutant
Actor::Message.new( Actor::Message.new(
:result, :result,
JobResult.new( JobResult.new(
job: job, job: job,
payload: result payload: result
) )
) )

View file

@ -52,8 +52,8 @@ module SharedContext
let(:config) do let(:config) do
Mutant::Config::DEFAULT.with( Mutant::Config::DEFAULT.with(
jobs: 1, jobs: 1,
reporter: Mutant::Reporter::Null.new reporter: Mutant::Reporter::Null.new
) )
end end
@ -94,19 +94,19 @@ module SharedContext
let(:mutation_a_test_result) do let(:mutation_a_test_result) do
Mutant::Result::Test.new( Mutant::Result::Test.new(
tests: [test_a], tests: [test_a],
passed: false, passed: false,
runtime: 1.0, runtime: 1.0,
output: 'mutation a test result output' output: 'mutation a test result output'
) )
end end
let(:mutation_b_test_result) do let(:mutation_b_test_result) do
Mutant::Result::Test.new( Mutant::Result::Test.new(
tests: [test_a], tests: [test_a],
passed: false, passed: false,
runtime: 1.0, runtime: 1.0,
output: 'mutation b test result output' output: 'mutation b test result output'
) )
end end

View file

@ -177,8 +177,8 @@ RSpec.describe Mutant::Env::Bootstrap do
Mutant::Scope.new(TestApp::Empty, match_expressions.last), Mutant::Scope.new(TestApp::Empty, match_expressions.last),
Mutant::Scope.new(TestApp::Literal, match_expressions.first) Mutant::Scope.new(TestApp::Literal, match_expressions.first)
], ],
mutations: subjects.flat_map(&:mutations), mutations: subjects.flat_map(&:mutations),
subjects: subjects subjects: subjects
) )
end end

View file

@ -41,9 +41,9 @@ RSpec.describe Mutant::Env do
let(:mutation_subject) do let(:mutation_subject) do
instance_double( instance_double(
Mutant::Subject, Mutant::Subject,
context: context, context: context,
identification: 'subject', identification: 'subject',
source: 'original' source: 'original'
) )
end end
@ -53,7 +53,7 @@ RSpec.describe Mutant::Env do
specify do specify do
should eql( should eql(
Mutant::Result::Mutation.new( Mutant::Result::Mutation.new(
mutation: mutation, mutation: mutation,
test_result: test_result test_result: test_result
) )
) )

View file

@ -88,8 +88,8 @@ RSpec.describe Mutant::Integration::Rspec do
let(:world) do let(:world) do
double( double(
'world', 'world',
example_groups: example_groups, example_groups: example_groups,
filtered_examples: filtered_examples filtered_examples: filtered_examples
) )
end end

View file

@ -41,7 +41,7 @@ RSpec.describe Mutant::Isolation::Fork do
receiver: io, receiver: io,
selector: :pipe, selector: :pipe,
arguments: [binmode: true], arguments: [binmode: true],
reaction: { reaction: {
yields: [[reader, writer]] yields: [[reader, writer]]
} }
} }
@ -53,25 +53,25 @@ RSpec.describe Mutant::Isolation::Fork do
[ [
*prefork_expectations, *prefork_expectations,
{ {
receiver: process, receiver: process,
selector: :fork, selector: :fork,
reaction: { reaction: {
yields: [], yields: [],
return: pid return: pid
} }
}, },
# Inside the killfork # Inside the killfork
{ {
receiver: reader, receiver: reader,
selector: :close selector: :close
}, },
{ {
receiver: writer, receiver: writer,
selector: :binmode selector: :binmode
}, },
{ {
receiver: devnull, receiver: devnull,
selector: :call, selector: :call,
reaction: { reaction: {
yields: [nullio] yields: [nullio]
} }
@ -90,7 +90,7 @@ RSpec.describe Mutant::Isolation::Fork do
receiver: marshal, receiver: marshal,
selector: :dump, selector: :dump,
arguments: [block_return], arguments: [block_return],
reaction: { reaction: {
return: block_return_blob return: block_return_blob
} }
}, },
@ -100,19 +100,19 @@ RSpec.describe Mutant::Isolation::Fork do
arguments: [block_return_blob] arguments: [block_return_blob]
}, },
{ {
receiver: writer, receiver: writer,
selector: :close selector: :close
}, },
# Outside the killfork # Outside the killfork
{ {
receiver: writer, receiver: writer,
selector: :close selector: :close
}, },
{ {
receiver: marshal, receiver: marshal,
selector: :load, selector: :load,
arguments: [reader], arguments: [reader],
reaction: { reaction: {
return: block_return return: block_return
} }
}, },

View file

@ -32,7 +32,7 @@ RSpec.describe Mutant::Zombifier do
expected_payload: { expected_payload: {
logical_name: 'project' logical_name: 'project'
}, },
return_value: true return_value: true
), ),
MutantSpec::RubyVM::EventExpectation::Eval.new( MutantSpec::RubyVM::EventExpectation::Eval.new(
expected_payload: { expected_payload: {
@ -41,20 +41,20 @@ RSpec.describe Mutant::Zombifier do
source_location: 'a/project.rb' source_location: 'a/project.rb'
}, },
trigger_requires: %w[foo bar], trigger_requires: %w[foo bar],
return_value: nil return_value: nil
), ),
MutantSpec::RubyVM::EventExpectation::Require.new( MutantSpec::RubyVM::EventExpectation::Require.new(
expected_payload: { expected_payload: {
logical_name: 'foo' logical_name: 'foo'
}, },
trigger_requires: %w[bar], trigger_requires: %w[bar],
return_value: true return_value: true
), ),
MutantSpec::RubyVM::EventExpectation::Require.new( MutantSpec::RubyVM::EventExpectation::Require.new(
expected_payload: { expected_payload: {
logical_name: 'bar' logical_name: 'bar'
}, },
return_value: true return_value: true
), ),
MutantSpec::RubyVM::EventExpectation::Eval.new( MutantSpec::RubyVM::EventExpectation::Eval.new(
expected_payload: { expected_payload: {
@ -63,13 +63,13 @@ RSpec.describe Mutant::Zombifier do
source_location: 'b/bar.rb' source_location: 'b/bar.rb'
}, },
trigger_requires: %w[], trigger_requires: %w[],
return_value: nil return_value: nil
), ),
MutantSpec::RubyVM::EventExpectation::Require.new( MutantSpec::RubyVM::EventExpectation::Require.new(
expected_payload: { expected_payload: {
logical_name: 'bar' logical_name: 'bar'
}, },
return_value: false return_value: false
) )
] ]
) )