Permalink
Browse files

Add better test scenario for around callback return results

  • Loading branch information...
1 parent df615f1 commit 9798ee2619154de5b2f052735d1ec80c47857178 @obrie obrie committed with josevalim Mar 7, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 activesupport/test/callbacks_test.rb
View
10 activesupport/test/callbacks_test.rb
@@ -303,12 +303,22 @@ def save
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

0 comments on commit 9798ee2

Please sign in to comment.