Permalink
Browse files

Check if the output is empty rather than asserting for equality

Also fix indent of test block.
  • Loading branch information...
1 parent bebe4a9 commit 66dc5762178dc2cf23349fd7de4bb3f97f9359ec @carlosantoniodasilva carlosantoniodasilva committed Mar 20, 2014
Showing with 4 additions and 5 deletions.
  1. +4 −5 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"

0 comments on commit 66dc576

Please sign in to comment.