Memorandums, Logbook & Shares
Friday, August 17, 2012
Check if a function is called in Rails unit test
required gem: mocha
some_object.expects(:some_function_name).[expected calls]
where
[expected_calls]
.once - be call once only
.never - should never be called.
.at_most
...
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.