I have next modules.
module A
module B
def self.method_b(value)
#code
end
end
end
and
module A
module C
def self.method_c(value)
A::B.method_b(value)
end
end
end
How to test these module? How to create stub self.method_b?
spec_helper.rb
RSpec.configure do |config|
config.mock_with :mocha
end
Thanks.
You have switched out the built-in RSpec mocking library for mocha. That has a different API. Try: