From 66dc5762178dc2cf23349fd7de4bb3f97f9359ec Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 20 Mar 2014 08:19:33 -0300 Subject: Check if the output is empty rather than asserting for equality Also fix indent of test block. --- railties/test/application/rake/dbs_test.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'railties') diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index 6bf49f3d67..7cc4ea0ce1 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -33,12 +33,11 @@ module ApplicationTests 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 @@ module ApplicationTests 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" -- cgit v1.2.3