diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-26 12:27:58 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-26 12:27:58 -0600 |
commit | 04bc52f7dc4c264fd1825d565e058047c58bb694 (patch) | |
tree | 4ed8315bdb6429636db4b604555e505069de769a /activerecord/test | |
parent | 67b8f92743273370beca4d9c089ed9412fbfe940 (diff) | |
parent | f33965f937044b01a472ed3cea14f0a401abaad4 (diff) | |
download | rails-04bc52f7dc4c264fd1825d565e058047c58bb694.tar.gz rails-04bc52f7dc4c264fd1825d565e058047c58bb694.tar.bz2 rails-04bc52f7dc4c264fd1825d565e058047c58bb694.zip |
Merge pull request #19924 from iamvery/db-tasks-exit-status
Explicitly exit with status "1" for create and drop failures
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/tasks/postgresql_rake_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/tasks/sqlite_rake_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb index c3fd0b2383..c31f94b2f2 100644 --- a/activerecord/test/cases/tasks/postgresql_rake_test.rb +++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb @@ -60,7 +60,7 @@ module ActiveRecord $stderr.expects(:puts). with("Couldn't create database for #{@configuration.inspect}") - ActiveRecord::Tasks::DatabaseTasks.create @configuration + assert_raises(Exception) { ActiveRecord::Tasks::DatabaseTasks.create @configuration } end def test_create_when_database_exists_outputs_info_to_stderr diff --git a/activerecord/test/cases/tasks/sqlite_rake_test.rb b/activerecord/test/cases/tasks/sqlite_rake_test.rb index 750d5e42dc..0aea0c3b38 100644 --- a/activerecord/test/cases/tasks/sqlite_rake_test.rb +++ b/activerecord/test/cases/tasks/sqlite_rake_test.rb @@ -53,7 +53,7 @@ module ActiveRecord $stderr.expects(:puts). with("Couldn't create database for #{@configuration.inspect}") - ActiveRecord::Tasks::DatabaseTasks.create @configuration, '/rails/root' + assert_raises(Exception) { ActiveRecord::Tasks::DatabaseTasks.create @configuration, '/rails/root' } end end |