Hi all guys!im new in rails! i have a forum,have_many topics,and the topic also has_many replies.Now i want to write the respec for the repliescontroller: describe RepliesController do controller_name :repies describe "All Requests",:share=>true do before do @forum = mock_model(Forum,:id=>''1'') @topic = mock_model(Topic,:id=>''1'',:forum =>@forum) @reply = mock_model(Reply,:topic => @topic,:save=>true) Topic.stub!(:find).and_return(@topic) Reply.stub!(:new).and_return(@reply) @params = { :topic_id => @topic.id, :forum_id => @forum.id, :title => ''Ragnarok'', :body => ''ragnarokrangarkratnonfgdsakl'' } end def do_post post :create,:reply =>@params end it "should call Reply modl with new values" do Reply.should_receive(:new).with(anything()).and_return(@reply) do_post end it "should add reply to the topic" do do_post response.should redirect_to([@forum,@topic]) end end end No route matches Error! i have no idea for rspec!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---