Mocks are interesting, but verifying that methods were called on the mock seems like testing side effects rather than behavior.
@realntl Same with a test double (aka a mock)? You're passing in a fake object to stand in for the real one, and asserting the side effect
-
-
@sgrif but what are you testing? I want to pass in a payment processor that declines every card, and assert that I don't complete the order. -
@sgrif the contract of the payment processor is irrelevant, which is the only thing a mock can assert on, right? (I could be crazy here) - 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.