diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:16:09 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:16:09 +0200 |
commit | 783763bde97bea3d0c200038453008a8cfff1e88 (patch) | |
tree | 898d547f9d4c4e767362e6c6dc722b98fec4c07b /railties/test/railties/engine_test.rb | |
parent | 69ab3eb57e8387b0dd9d672b5e8d9185395baa03 (diff) | |
download | rails-783763bde97bea3d0c200038453008a8cfff1e88.tar.gz rails-783763bde97bea3d0c200038453008a8cfff1e88.tar.bz2 rails-783763bde97bea3d0c200038453008a8cfff1e88.zip |
applies new string literal convention in railties/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
Diffstat (limited to 'railties/test/railties/engine_test.rb')
-rw-r--r-- | railties/test/railties/engine_test.rb | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index fb8de84e1b..0ecabe95fa 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -109,7 +109,7 @@ module RailtiesTest end end - test 'respects the order of railties when installing migrations' do + test "respects the order of railties when installing migrations" do @blog = engine "blog" do |plugin| plugin.write "lib/blog.rb", <<-RUBY module Blog @@ -210,11 +210,11 @@ module RailtiesTest test "no rake task without migrations" do boot_rails - require 'rake' - require 'rdoc/task' - require 'rake/testtask' + require "rake" + require "rdoc/task" + require "rake/testtask" Rails.application.load_tasks - assert !Rake::Task.task_defined?('bukkits:install:migrations') + assert !Rake::Task.task_defined?("bukkits:install:migrations") end test "puts its lib directory on load path" do @@ -356,11 +356,11 @@ module RailtiesTest boot_rails - get '/foo' - assert_equal 'foo', last_response.body + get "/foo" + assert_equal "foo", last_response.body - get '/bar' - assert_equal 'bar', last_response.body + get "/bar" + assert_equal "bar", last_response.body end test "rake tasks lib tasks are loaded" do @@ -372,9 +372,9 @@ module RailtiesTest RUBY boot_rails - require 'rake' - require 'rdoc/task' - require 'rake/testtask' + require "rake" + require "rdoc/task" + require "rake/testtask" Rails.application.load_tasks Rake::Task[:foo].invoke assert $executed @@ -385,18 +385,18 @@ module RailtiesTest config.i18n.load_path << "#{app_path}/app/locales/en.yml" RUBY - app_file 'app/locales/en.yml', <<-YAML + app_file "app/locales/en.yml", <<-YAML en: bar: "1" YAML - app_file 'config/locales/en.yml', <<-YAML + app_file "config/locales/en.yml", <<-YAML en: foo: "2" bar: "2" YAML - @plugin.write 'config/locales/en.yml', <<-YAML + @plugin.write "config/locales/en.yml", <<-YAML en: foo: "3" YAML @@ -628,11 +628,11 @@ YAML env = Rack::MockRequest.env_for("/") Bukkits::Engine.call(env) - assert_equal Bukkits::Engine.routes, env['action_dispatch.routes'] + assert_equal Bukkits::Engine.routes, env["action_dispatch.routes"] env = Rack::MockRequest.env_for("/") Rails.application.call(env) - assert_equal Rails.application.routes, env['action_dispatch.routes'] + assert_equal Rails.application.routes, env["action_dispatch.routes"] end test "isolated engine should include only its own routes and helpers" do @@ -1019,7 +1019,7 @@ YAML # check expanding paths engine_dir = @plugin.path.chomp("/").split("/").last - engine_path = File.join(@plugin.path, '..', engine_dir) + engine_path = File.join(@plugin.path, "..", engine_dir) assert_equal Bukkits::Engine.instance, Rails::Engine.find(engine_path) end @@ -1288,11 +1288,11 @@ YAML boot_rails - get("/bukkits/bukkit", {}, {'SCRIPT_NAME' => '/foo'}) - assert_equal '/foo/bar', last_response.body + get("/bukkits/bukkit", {}, {"SCRIPT_NAME" => "/foo"}) + assert_equal "/foo/bar", last_response.body - get("/bar", {}, {'SCRIPT_NAME' => '/foo'}) - assert_equal '/foo/bukkits/bukkit', last_response.body + get("/bar", {}, {"SCRIPT_NAME" => "/foo"}) + assert_equal "/foo/bukkits/bukkit", last_response.body end test "paths are properly generated when application is mounted at sub-path and relative_url_root is set" do @@ -1337,11 +1337,11 @@ YAML boot_rails - get("/bukkits/bukkit", {}, {'SCRIPT_NAME' => '/foo'}) - assert_equal '/foo/bar', last_response.body + get("/bukkits/bukkit", {}, {"SCRIPT_NAME" => "/foo"}) + assert_equal "/foo/bar", last_response.body - get("/bar", {}, {'SCRIPT_NAME' => '/foo'}) - assert_equal '/foo/bukkits/bukkit', last_response.body + get("/bar", {}, {"SCRIPT_NAME" => "/foo"}) + assert_equal "/foo/bukkits/bukkit", last_response.body end private |