I have the following code
class SomeClass
def initialize(opts)
if opts[:should_load]
load
else
setup(opts[:path])
end
end
def load; end
def setup; end
end
And I want to test that the appropriate method is being called, but I cannot figure out how to do this with RSpec. Any tips?
Play with
Object#any_instance(rspec >= 2.6.0):