diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-07-30 19:52:51 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-07-30 22:52:38 -0300 |
commit | 32f49612e79db133140cbdd018a34d16f6e99efc (patch) | |
tree | caa8da42d8866c3c4f4b8d6fca22fcf5fa00d847 /railties/test/application | |
parent | 5fc5665066110031ad4c76c9bc843713470824d0 (diff) | |
download | rails-32f49612e79db133140cbdd018a34d16f6e99efc.tar.gz rails-32f49612e79db133140cbdd018a34d16f6e99efc.tar.bz2 rails-32f49612e79db133140cbdd018a34d16f6e99efc.zip |
Fix / improve some assertions
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/configuration_test.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 845626379d..e661b6f4cc 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -440,7 +440,7 @@ module ApplicationTests end get "/" - assert last_response.body =~ /_xsrf_token_here/ + assert_match "_xsrf_token_here", last_response.body end test "sets ActionDispatch.test_app" do @@ -977,9 +977,7 @@ module ApplicationTests require "#{app_path}/config/environment" - db_config = Rails.application.config.database_configuration - - assert db_config.is_a?(Hash) + assert_kind_of Hash, Rails.application.config.database_configuration end test 'config.action_mailer.show_previews defaults to true in development' do @@ -993,7 +991,7 @@ module ApplicationTests Rails.env = "production" require "#{app_path}/config/environment" - assert_equal Rails.application.config.action_mailer.show_previews, false + assert_equal false, Rails.application.config.action_mailer.show_previews end test 'config.action_mailer.show_previews can be set in the configuration file' do @@ -1003,7 +1001,7 @@ module ApplicationTests RUBY require "#{app_path}/config/environment" - assert_equal Rails.application.config.action_mailer.show_previews, true + assert_equal true, Rails.application.config.action_mailer.show_previews end test "config_for loads custom configuration from yaml files" do |