Add better test scenario for around callback return results

This commit is contained in:
Aaron Pfeifer 2011-03-07 21:29:38 +08:00 committed by José Valim
parent df615f127e
commit 9798ee2619

@ -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