-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Let's say I have a function that looks like this:
function do_something_useful(a, b, c)
d = @mock(first_part(a, b))
if @mock(second_part(c, d))
@mock(third_part())
else
@mock(forth_part())
end
endAs you can see, I have to put @mock everywhere if I want to be able to patch all of them. The trouble is that the code does not look clean anymore. Would it be possible to do something like:
@mockfuns first_part second_part third_part forth_path
@mock function do_something_useful(a, b, c)
d = first_part(a, b)
if second_part(c, d)
third_part()
else
forth_part()
end
endMetadata
Metadata
Assignees
Labels
No labels