Harry Bishop <[EMAIL PROTECTED]> writes: > I'm posting to the create action and seeing the line "at the motion save > part of create in the following: > > def create > @motion = Motion.new(params[:motion]) > respond_to do |format| > if @motion.save > puts "at the motion save part of create" > flash[:notice] = 'Motion was successfully created. Needs a > second' > format.html { redirect_to(@motion) } > > but when I insert the line in motions_controller_spec.rb > > response.should redirect_to(@motion) > > I receive "got no redirect" > expected redirect to #<Spec::Mocks::Mock:0x112ec96 @name=#<Motion id: > 20, title:........>>, got no redirect > > Is there something missing in the test? > > TIA, > Harry
Can you post your example code as well? Also, are there any errors? Here are my two guesses at this point: * you forgot to make a request in the example (post :create) * there's some error that is keeping the action from getting to the redirect Also, what is the value of response.code in the example? Pat _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users