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
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users