Hi guys. I’m curious to know why this method of stubbing a render
fails:
ActionController::Base.stub!(:render_to_string).and_return ‘something’
And why this is [one of] the correct methods:
controller.stub_render :partial => ‘/some/partial’
Cheers,
Nick
Please ignore that email. I should be calling #stub! on the controller
in question, rather than on ActionController::Base , like so:
controller.stub!(:render_to_string.and_return ‘something’
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.