diff options
author | Aaron Pfeifer <aaron.pfeifer@gmail.com> | 2011-03-07 21:29:38 +0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-03-08 15:01:06 +0800 |
commit | 9798ee2619154de5b2f052735d1ec80c47857178 (patch) | |
tree | 09dd728508e19edc86489659bf9bdde5b6e5ce2c /activesupport | |
parent | df615f127ece4f712448ae5bd3e993ec378d8f7a (diff) | |
download | rails-9798ee2619154de5b2f052735d1ec80c47857178.tar.gz rails-9798ee2619154de5b2f052735d1ec80c47857178.tar.bz2 rails-9798ee2619154de5b2f052735d1ec80c47857178.zip |
Add better test scenario for around callback return results
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/callbacks_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/callbacks_test.rb b/activesupport/test/callbacks_test.rb index 0b4cc4ac69..816dcad968 100644 --- a/activesupport/test/callbacks_test.rb +++ b/activesupport/test/callbacks_test.rb @@ -303,12 +303,22 @@ module CallbacksTest class AroundPersonResult < MySuper attr_reader :result + set_callback :save, :after, :tweedle_1 set_callback :save, :around, :tweedle_dum + set_callback :save, :after, :tweedle_2 def tweedle_dum @result = yield end + + def tweedle_1 + :tweedle_1 + end + def tweedle_2 + :tweedle_2 + end + def save run_callbacks :save do :running |