Myron MarstonJun 29, 2012In the 2.11 release, rspec-mocks is gaining a significant new capability that, as far as I know, isn’t provided by any other ruby mocking library: constant stubbing[^foot_1]. Let’s look at the API, and then talk a bit about some of the use cases for it. The API The main API is stub_const: describe "stub_const" do it "changes the constant value for the duration of the examp