I have a code that looks like this:
def call(some_id:) verify_before = @verify.call(some_id) return verify_before if verify_before.sucess? did_something = @processor.call(some_id) return did_something unless did_something.sucess? @verify.call(some_id)end
I would like to mock @verify
so in the first time it will return sucess?
= false
and on the second call it will return true
What is the best approach?