Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check if the output is empty rather than asserting for equality

Also fix indent of test block.
  • Loading branch information...
commit 66dc5762178dc2cf23349fd7de4bb3f97f9359ec 1 parent bebe4a9
@carlosantoniodasilva carlosantoniodasilva authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 railties/test/application/rake/dbs_test.rb
View
9 railties/test/application/rake/dbs_test.rb
@@ -33,12 +33,11 @@ def expected
def db_create_and_drop
Dir.chdir(app_path) do
output = `bundle exec rake db:create`
- assert_equal output, ""
+ assert_empty output
assert File.exist?(expected[:database])
- assert_equal expected[:database],
- ActiveRecord::Base.connection_config[:database]
+ assert_equal expected[:database], ActiveRecord::Base.connection_config[:database]
output = `bundle exec rake db:drop`
- assert_equal output, ""
+ assert_empty output
assert !File.exist?(expected[:database])
end
end
@@ -47,7 +46,7 @@ def db_create_and_drop
require "#{app_path}/config/environment"
expected[:database] = ActiveRecord::Base.configurations[Rails.env]['database']
db_create_and_drop
- end
+ end
test 'db:create and db:drop with database url' do
require "#{app_path}/config/environment"
Please sign in to comment.
Something went wrong with that request. Please try again.