I would like to assert that a particular method was called, but I don't want to mock/stub the method - I want to include that code in the test as well.
For example, in Ruby, something like:
def bar()
#stuff I want to test
end
def foo()
if condition
bar()
end
#more stuff I want to test
end
# The test:
foo()
assert_called :bar
Does anyone have a suggestion (or a better way to go about it)? My actual code is quite a bit more complex, so please don't take the simplicity of the example into account.