aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_many_associations_test.rb
diff options
context:
space:
mode:
authorIain Beeston <iain.beeston@gmail.com>2015-02-21 14:37:07 +0000
committerIain Beeston <iain.beeston@gmail.com>2015-04-03 09:37:19 +0100
commitd2876141d08341ec67cf6a11a073d1acfb920de7 (patch)
tree4d69bd159f9c16acb328adb680a090fc9f49470e /activerecord/test/cases/associations/has_many_associations_test.rb
parenta05f3e5f96f7a8aa55483d91becdbe49b81833fd (diff)
downloadrails-d2876141d08341ec67cf6a11a073d1acfb920de7.tar.gz
rails-d2876141d08341ec67cf6a11a073d1acfb920de7.tar.bz2
rails-d2876141d08341ec67cf6a11a073d1acfb920de7.zip
Raise ArgumentError if an unrecognised callback is skipped
At present, if you skip a callback that hasn't been defined, activesupport callbacks silently does nothing. However, it's easy to mistype the name of a callback and mistakenly think that it's being skipped, when it is not. This problem even exists in the current test suite. CallbacksTest::SkipCallbacksTest#test_skip_person attempts to skip callbacks that were never set up. This PR changes `skip_callback` to raise an `ArgumentError` if the specified callback cannot be found.
Diffstat (limited to 'activerecord/test/cases/associations/has_many_associations_test.rb')
0 files changed, 0 insertions, 0 deletions