I'm trying to stub a controller method using RSpec 2.0.0.beta.4 and Rails 3 and whenever I attempt to do it I get an error, e.g.
controller.stub!(:current_host).and_return(Factory.build(:host)) post :create Results in: Failure/Error: post :create can't convert nil into String # (eval):3:in `post' Removing the stub doesn't cause the error and the post is fails as expected. In fact even trying to dump the controller before the post causes this error (as I wasn't sure if it was still controller or had been moved to an instance variable). _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users