diff options
author | Akira Matsuda <ronnie@dio.jp> | 2014-08-27 00:53:19 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2014-08-28 14:41:00 +0900 |
commit | 4ded1311810312fe6614a28b93d7859fb854b23a (patch) | |
tree | 8f3887ad2fe7f74bde0fe296ea4ca442b4d9965d /railties | |
parent | 0c885d68189c4548dea3a833cb411c076799459c (diff) | |
download | rails-4ded1311810312fe6614a28b93d7859fb854b23a.tar.gz rails-4ded1311810312fe6614a28b93d7859fb854b23a.tar.bz2 rails-4ded1311810312fe6614a28b93d7859fb854b23a.zip |
Expectations first
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/configuration_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 4 | ||||
-rw-r--r-- | railties/test/application/middleware_test.rb | 2 | ||||
-rw-r--r-- | railties/test/commands/dbconsole_test.rb | 10 |
4 files changed, 9 insertions, 9 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index e661b6f4cc..db2106aed3 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -118,7 +118,7 @@ module ApplicationTests test "Rails::Application responds to paths" do require "#{app_path}/config/environment" assert_respond_to AppTemplate::Application, :paths - assert_equal AppTemplate::Application.paths["app/views"].expanded, ["#{app_path}/app/views"] + assert_equal ["#{app_path}/app/views"], AppTemplate::Application.paths["app/views"].expanded end test "the application root is set correctly" do diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index ae550331bd..2d45c9b53f 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -35,8 +35,8 @@ module ApplicationTests require "#{app_path}/config/environment" expanded_path = File.expand_path("app/views", app_path) - assert_equal ActionController::Base.view_paths[0].to_s, expanded_path - assert_equal ActionMailer::Base.view_paths[0].to_s, expanded_path + assert_equal expanded_path, ActionController::Base.view_paths[0].to_s + assert_equal expanded_path, ActionMailer::Base.view_paths[0].to_s end test "allows me to configure default url options for ActionMailer" do diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 33eb034b1c..a905598d80 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -83,7 +83,7 @@ module ApplicationTests add_to_config "config.ssl_options = { host: 'example.com' }" boot! - assert_equal Rails.application.middleware.first.args, [{host: 'example.com'}] + assert_equal [{host: 'example.com'}], Rails.application.middleware.first.args end test "removing Active Record omits its middleware" do diff --git a/railties/test/commands/dbconsole_test.rb b/railties/test/commands/dbconsole_test.rb index 214c7aa313..a3cd1eb0ed 100644 --- a/railties/test/commands/dbconsole_test.rb +++ b/railties/test/commands/dbconsole_test.rb @@ -28,7 +28,7 @@ class Rails::DBConsoleTest < ActiveSupport::TestCase } } app_db_config(config_sample) do - assert_equal Rails::DBConsole.new.config, config_sample["test"] + assert_equal config_sample["test"], Rails::DBConsole.new.config end end @@ -79,19 +79,19 @@ class Rails::DBConsoleTest < ActiveSupport::TestCase end def test_env - assert_equal Rails::DBConsole.new.environment, "test" + assert_equal "test", Rails::DBConsole.new.environment ENV['RAILS_ENV'] = nil ENV['RACK_ENV'] = nil Rails.stub(:respond_to?, false) do - assert_equal Rails::DBConsole.new.environment, "development" + assert_equal "development", Rails::DBConsole.new.environment ENV['RACK_ENV'] = "rack_env" - assert_equal Rails::DBConsole.new.environment, "rack_env" + assert_equal "rack_env", Rails::DBConsole.new.environment ENV['RAILS_ENV'] = "rails_env" - assert_equal Rails::DBConsole.new.environment, "rails_env" + assert_equal "rails_env", Rails::DBConsole.new.environment end ensure ENV['RAILS_ENV'] = "test" |