diff options
author | Jay Hayes <ur@iamvery.com> | 2013-10-14 11:20:51 -0500 |
---|---|---|
committer | Jay Hayes <ur@iamvery.com> | 2013-11-11 07:54:30 -0600 |
commit | 22f80ae57b26907f662b7fd50a7270a6381e527e (patch) | |
tree | fed6f18701451f9a7a7237cd1061f4f5e5181b43 /activerecord/test/cases/validations/association_validation_test.rb | |
parent | a11ddbe55fd27f38e0085ee1210947e3d8f47220 (diff) | |
download | rails-22f80ae57b26907f662b7fd50a7270a6381e527e.tar.gz rails-22f80ae57b26907f662b7fd50a7270a6381e527e.tar.bz2 rails-22f80ae57b26907f662b7fd50a7270a6381e527e.zip |
Explicitly exit with status "1" for create and drop failures
* A non-zero exit status allows subsequent shell commands to be chained
together such as: `rake db:reset test:prepare && rspec && cap deploy`
(if you're feeling brave :)
* Any exceptions raised during the `create` and `drop` tasks are caught
in order to print a "pretty" message to the user. Unfortunately doing
so prevents rake from aborting with a non-zero exit status to the shell.
* Therefore we re-raise the exceptions after the "pretty" message and
re-catch them in the task.
* From the task we explicitly exit with a non-zero status. This method
was chosen (rather than just letting rake fail from the exception) so
that the backtrace is suppressed and the output to stderr is
unchanged.
* Update activerecord CHANGELOG
Diffstat (limited to 'activerecord/test/cases/validations/association_validation_test.rb')
0 files changed, 0 insertions, 0 deletions