# your unit test case
def test_example_use_case_1
my_obj = MyObject.new
result = my_obj.calculate(2, +, 2)
assert_equal 4, result, BigEar::record_proc(my_obj) { my_obj.calculate(2, +, 2) }
end
- If
assert
doesn't fail,BigEar
isn't executed. - Otherwise,
BigEar
records all the method calls done to your object duringmy_obj.calculate(2, +, 2)
and dumps it asmessage
ofassert