diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:44:11 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:44:11 +0200 |
commit | 411ccbdab2608c62aabdb320d52cb02d446bb39c (patch) | |
tree | 05671553ac2a23dd1db4d11949c1ac43c3dd1367 /railties/test | |
parent | 60b67d76dc1d98e4269aac7705e9d8323eb42942 (diff) | |
download | rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.tar.gz rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.tar.bz2 rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.zip |
remove redundant curlies from hash arguments
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/assets_test.rb | 4 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 6 | ||||
-rw-r--r-- | railties/test/application/mailer_previews_test.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/create_migration_test.rb | 8 | ||||
-rw-r--r-- | railties/test/generators/model_generator_test.rb | 12 | ||||
-rw-r--r-- | railties/test/railties/engine_test.rb | 8 |
6 files changed, 20 insertions, 20 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 3b5bf7ce87..9396e2cff7 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -475,9 +475,9 @@ module ApplicationTests class ::PostsController < ActionController::Base; end - get "/posts", {}, {"HTTPS"=>"off"} + get "/posts", {}, "HTTPS"=>"off" assert_match('src="http://example.com/assets/application.self.js', last_response.body) - get "/posts", {}, {"HTTPS"=>"on"} + get "/posts", {}, "HTTPS"=>"on" assert_match('src="https://example.com/assets/application.self.js', last_response.body) end diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 01bdcfb9aa..ee482009d8 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1044,7 +1044,7 @@ module ApplicationTests app "development" - post "/posts", {post: {"title" =>"zomg"}} + post "/posts", post: {"title" =>"zomg"} assert_equal "permitted", last_response.body end @@ -1068,7 +1068,7 @@ module ApplicationTests assert_equal :raise, ActionController::Parameters.action_on_unpermitted_parameters - post "/posts", {post: {"title" =>"zomg"}} + post "/posts", post: {"title" =>"zomg"} assert_match "We're sorry, but something went wrong", last_response.body end @@ -1108,7 +1108,7 @@ module ApplicationTests assert_equal :raise, ActionController::Parameters.action_on_unpermitted_parameters - post "/posts", {post: {"title" =>"zomg"}, format: "json"} + post "/posts", post: {"title" =>"zomg"}, format: "json" assert_equal 200, last_response.status end diff --git a/railties/test/application/mailer_previews_test.rb b/railties/test/application/mailer_previews_test.rb index 18e3a7bf0e..790aca2aa4 100644 --- a/railties/test/application/mailer_previews_test.rb +++ b/railties/test/application/mailer_previews_test.rb @@ -30,7 +30,7 @@ module ApplicationTests test "/rails/mailers is accessible with correct configuration" do add_to_config "config.action_mailer.show_previews = true" app("production") - get "/rails/mailers", {}, {"REMOTE_ADDR" => "4.2.42.42"} + get "/rails/mailers", {}, "REMOTE_ADDR" => "4.2.42.42" assert_equal 200, last_response.status end diff --git a/railties/test/generators/create_migration_test.rb b/railties/test/generators/create_migration_test.rb index 661a26afad..ddd40e4d02 100644 --- a/railties/test/generators/create_migration_test.rb +++ b/railties/test/generators/create_migration_test.rb @@ -51,7 +51,7 @@ class CreateMigrationTest < Rails::Generators::TestCase end def test_invoke_pretended - create_migration(default_destination_path, {}, { pretend: true }) + create_migration(default_destination_path, {}, pretend: true) assert_no_file @migration.destination end @@ -92,7 +92,7 @@ class CreateMigrationTest < Rails::Generators::TestCase def test_invoke_forced_pretended_when_exists_not_identical migration_exists! - create_migration(default_destination_path, { force: true }, { pretend: true }) do + create_migration(default_destination_path, { force: true }, pretend: true) do "different content" end @@ -104,7 +104,7 @@ class CreateMigrationTest < Rails::Generators::TestCase def test_invoke_skipped_when_exists_not_identical migration_exists! - create_migration(default_destination_path, {}, { skip: true }) { "different content" } + create_migration(default_destination_path, {}, skip: true) { "different content" } assert_match(/skip db\/migrate\/2_create_articles.rb\n/, invoke!) assert_no_file @migration.destination @@ -120,7 +120,7 @@ class CreateMigrationTest < Rails::Generators::TestCase def test_revoke_pretended migration_exists! - create_migration(default_destination_path, {}, { pretend: true }) + create_migration(default_destination_path, {}, pretend: true) assert_match(/remove db\/migrate\/1_create_articles.rb\n/, revoke!) assert_file @existing_migration.destination diff --git a/railties/test/generators/model_generator_test.rb b/railties/test/generators/model_generator_test.rb index 45760d7129..d10671a7b4 100644 --- a/railties/test/generators/model_generator_test.rb +++ b/railties/test/generators/model_generator_test.rb @@ -300,7 +300,7 @@ class ModelGeneratorTest < Rails::Generators::TestCase assert_file "test/fixtures/accounts.yml", /name: MyString/, /age: 1/ assert_generated_fixture("test/fixtures/accounts.yml", - {"one"=>{"name"=>"MyString", "age"=>1}, "two"=>{"name"=>"MyString", "age"=>1}}) + "one"=>{"name"=>"MyString", "age"=>1}, "two"=>{"name"=>"MyString", "age"=>1}) end def test_fixtures_use_the_references_ids @@ -308,7 +308,7 @@ class ModelGeneratorTest < Rails::Generators::TestCase assert_file "test/fixtures/line_items.yml", /product: one\n cart: one/ assert_generated_fixture("test/fixtures/line_items.yml", - {"one"=>{"product"=>"one", "cart"=>"one"}, "two"=>{"product"=>"two", "cart"=>"two"}}) + "one"=>{"product"=>"one", "cart"=>"one"}, "two"=>{"product"=>"two", "cart"=>"two"}) end def test_fixtures_use_the_references_ids_and_type @@ -316,15 +316,15 @@ class ModelGeneratorTest < Rails::Generators::TestCase assert_file "test/fixtures/line_items.yml", /product: one\n product_type: Product\n cart: one/ assert_generated_fixture("test/fixtures/line_items.yml", - {"one"=>{"product"=>"one", "product_type"=>"Product", "cart"=>"one"}, - "two"=>{"product"=>"two", "product_type"=>"Product", "cart"=>"two"}}) + "one"=>{"product"=>"one", "product_type"=>"Product", "cart"=>"one"}, + "two"=>{"product"=>"two", "product_type"=>"Product", "cart"=>"two"}) end def test_fixtures_respect_reserved_yml_keywords run_generator ["LineItem", "no:integer", "Off:boolean", "ON:boolean"] assert_generated_fixture("test/fixtures/line_items.yml", - {"one"=>{"no"=>1, "Off"=>false, "ON"=>false}, "two"=>{"no"=>1, "Off"=>false, "ON"=>false}}) + "one"=>{"no"=>1, "Off"=>false, "ON"=>false}, "two"=>{"no"=>1, "Off"=>false, "ON"=>false}) end def test_fixture_is_skipped @@ -343,7 +343,7 @@ class ModelGeneratorTest < Rails::Generators::TestCase ActiveRecord::Base.pluralize_table_names = false run_generator assert_generated_fixture("test/fixtures/account.yml", - {"one"=>{"name"=>"MyString", "age"=>1}, "two"=>{"name"=>"MyString", "age"=>1}}) + "one"=>{"name"=>"MyString", "age"=>1}, "two"=>{"name"=>"MyString", "age"=>1}) ensure ActiveRecord::Base.pluralize_table_names = original_pluralize_table_name end diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 0ecabe95fa..534761c6a7 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -1288,10 +1288,10 @@ YAML boot_rails - get("/bukkits/bukkit", {}, {"SCRIPT_NAME" => "/foo"}) + get("/bukkits/bukkit", {}, "SCRIPT_NAME" => "/foo") assert_equal "/foo/bar", last_response.body - get("/bar", {}, {"SCRIPT_NAME" => "/foo"}) + get("/bar", {}, "SCRIPT_NAME" => "/foo") assert_equal "/foo/bukkits/bukkit", last_response.body end @@ -1337,10 +1337,10 @@ YAML boot_rails - get("/bukkits/bukkit", {}, {"SCRIPT_NAME" => "/foo"}) + get("/bukkits/bukkit", {}, "SCRIPT_NAME" => "/foo") assert_equal "/foo/bar", last_response.body - get("/bar", {}, {"SCRIPT_NAME" => "/foo"}) + get("/bar", {}, "SCRIPT_NAME" => "/foo") assert_equal "/foo/bukkits/bukkit", last_response.body end |