Stubing chained scoped methods in Rspec
November 4, 2010
Ever wondered how to stub something like Car.red.fast.nice
in rspec?
Car.stub_chain(:red, :nice, :fast).and_return(red_nice_fast_mock_car)
Ever wondered how to stub something like Car.red.fast.nice
in rspec?
Car.stub_chain(:red, :nice, :fast).and_return(red_nice_fast_mock_car)