Reputation: 1509
If I have the following code...
class Controller
def create
object = Foo.new
object.bar("string")
end
end
How might I rspec test that my Foo
object received my bar
method?
Upvotes: 0
Views: 98
Reputation: 309
If you want to check whether your Foo
object has reached your bar
method or not, you need to verify whatever the bar
method returns or does. If that verification passes, it means your bar
method was reached and executed successfully.
Upvotes: 1