Permalink
Browse files

Fix / improve some assertions

  • Loading branch information...
1 parent 5fc5665 commit 32f49612e79db133140cbdd018a34d16f6e99efc @carlosantoniodasilva carlosantoniodasilva committed Jul 30, 2014
Showing with 4 additions and 6 deletions.
  1. +4 −6 railties/test/application/configuration_test.rb
@@ -440,7 +440,7 @@ def index
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 @@ def index
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 @@ def index
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 @@ def index
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

0 comments on commit 32f4961

Please sign in to comment.