Add better test scenario for around callback return results
This commit is contained in:
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
|
||||
|
Loading…
Reference in New Issue
Block a user