diff options
author | Jay Hayes <ur@iamvery.com> | 2015-08-07 15:05:36 -0500 |
---|---|---|
committer | Jay Hayes <ur@iamvery.com> | 2015-10-20 19:17:58 -0500 |
commit | 1cd35be3eb04da88d790493d3ce9807efeaeddba (patch) | |
tree | d2be9998ba35f8bbab18845056c25f2c69db8e21 /railties/test | |
parent | 213ff7ca0c27739715bda83a9c6237c03a577c2b (diff) | |
download | rails-1cd35be3eb04da88d790493d3ce9807efeaeddba.tar.gz rails-1cd35be3eb04da88d790493d3ce9807efeaeddba.tar.bz2 rails-1cd35be3eb04da88d790493d3ce9807efeaeddba.zip |
Fix test of drop failure
* Previously the sqlite3 adapter could not "fail" on drop. Now an error
is raised when no file exists.
* Also updates purge to be resilient of drop failures. This is how purge
is expected to behave.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/rake/dbs_test.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index 8731b7d86b..9b62764db2 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -69,10 +69,7 @@ module ApplicationTests test 'db:drop failure because database does not exist' do Dir.chdir(app_path) do output = `bin/rake db:drop 2>&1` - # This assertion should work, but it does not. The SQLite3 adapter - # does not raise an error when nothing exists to drop. - # https://github.com/rails/rails/blob/f00554a8226b9529c38be1f3e61b6b1888682fb4/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L34-L37 - # assert_match /does not exist/, output + assert_match /does not exist/, output assert_equal 0, $?.exitstatus end end |