diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-30 10:47:29 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-30 10:47:29 -0700 |
commit | 3910817bfeae47bdaa4453f6639230eb4d45aaeb (patch) | |
tree | f3060537977f048a37f5cde162c1ee02a62bb463 /activerecord/test/cases/tasks/database_tasks_test.rb | |
parent | 0dd969e8b8b7e4f924245fa921f5b468e74a337d (diff) | |
parent | 253ccbc0acd500c25be58d0861d75d381505eb9d (diff) | |
download | rails-3910817bfeae47bdaa4453f6639230eb4d45aaeb.tar.gz rails-3910817bfeae47bdaa4453f6639230eb4d45aaeb.tar.bz2 rails-3910817bfeae47bdaa4453f6639230eb4d45aaeb.zip |
Merge pull request #10386 from kennyj/should_stop_task_when_missing_file
Abort a rake task when missing db/structure.sql like `db:schema:load` task.
Diffstat (limited to 'activerecord/test/cases/tasks/database_tasks_test.rb')
-rw-r--r-- | activerecord/test/cases/tasks/database_tasks_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/tasks/database_tasks_test.rb b/activerecord/test/cases/tasks/database_tasks_test.rb index 3bfbc92afd..e9000fef25 100644 --- a/activerecord/test/cases/tasks/database_tasks_test.rb +++ b/activerecord/test/cases/tasks/database_tasks_test.rb @@ -305,4 +305,11 @@ module ActiveRecord end end end + + class DatabaseTasksCheckSchemaFileTest < ActiveRecord::TestCase + def test_check_schema_file + Kernel.expects(:abort).with(regexp_matches(/awesome-file.sql/)) + ActiveRecord::Tasks::DatabaseTasks.check_schema_file("awesome-file.sql") + end + end end |