aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2019-02-09 10:50:58 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2019-02-09 10:50:58 +0900
commit25d8afb3a6e5cdc7da3ab0bb6f18c2b14fcabbdd (patch)
tree6afeff01f6cc7ed55ce77fc5e6181239c1ab4f75
parent50e4fda0a5ecef27f25785f0b261aa06ed55b9c5 (diff)
downloadrails-25d8afb3a6e5cdc7da3ab0bb6f18c2b14fcabbdd.tar.gz
rails-25d8afb3a6e5cdc7da3ab0bb6f18c2b14fcabbdd.tar.bz2
rails-25d8afb3a6e5cdc7da3ab0bb6f18c2b14fcabbdd.zip
Fix rubocop violations
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb4
-rw-r--r--railties/test/application/server_test.rb16
2 files changed, 9 insertions, 11 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index 90a5f2dcd1..8572d56722 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -81,7 +81,7 @@ class HashExtTest < ActiveSupport::TestCase
end
def test_deep_transform_values
- assert_equal({ "a" => "1", "b" => "2" }, @strings.deep_transform_values{ |value| value.to_s })
+ assert_equal({ "a" => "1", "b" => "2" }, @strings.deep_transform_values { |value| value.to_s })
assert_equal({ "a" => { "b" => { "c" => "3" } } }, @nested_strings.deep_transform_values { |value| value.to_s })
assert_equal({ "a" => [ { "b" => "2" }, { "c" => "3" }, "4" ] }, @string_array_of_hashes.deep_transform_values { |value| value.to_s })
end
@@ -93,7 +93,7 @@ class HashExtTest < ActiveSupport::TestCase
end
def test_deep_transform_values!
- assert_equal({ "a" => "1", "b" => "2" }, @strings.deep_transform_values!{ |value| value.to_s })
+ assert_equal({ "a" => "1", "b" => "2" }, @strings.deep_transform_values! { |value| value.to_s })
assert_equal({ "a" => { "b" => { "c" => "3" } } }, @nested_strings.deep_transform_values! { |value| value.to_s })
assert_equal({ "a" => [ { "b" => "2" }, { "c" => "3" }, "4" ] }, @string_array_of_hashes.deep_transform_values! { |value| value.to_s })
end
diff --git a/railties/test/application/server_test.rb b/railties/test/application/server_test.rb
index 5b8aab08d5..9df36b3444 100644
--- a/railties/test/application/server_test.rb
+++ b/railties/test/application/server_test.rb
@@ -30,17 +30,15 @@ module ApplicationTests
pid = nil
Bundler.with_original_env do
- begin
- pid = Process.spawn("bin/rails server -P tmp/dummy.pid", chdir: app_path, in: replica, out: replica, err: replica)
- assert_output("Listening", primary)
+ pid = Process.spawn("bin/rails server -P tmp/dummy.pid", chdir: app_path, in: replica, out: replica, err: replica)
+ assert_output("Listening", primary)
- rails("restart")
+ rails("restart")
- assert_output("Restarting", primary)
- assert_output("Inherited", primary)
- ensure
- kill(pid) if pid
- end
+ assert_output("Restarting", primary)
+ assert_output("Inherited", primary)
+ ensure
+ kill(pid) if pid
end
end