KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to test whether a function invokes other functions properly with minitest Ruby, but I cannot find a proper assert to test from the doc . The source code class SomeClass def invoke_function(name) name == "right" ? right () : wrong () end def right #... end def wrong #... end end The test code: describe SomeClass do it "should invoke right function" do # assert right() is called end it "should invoke other function" do # assert wrong() is called end end
Tags (comma-separated)
Save Edits
Cancel