2009/12/14 Amit Kulkarni <li...@ruby-forum.com> > Thanks David. > Also i am little bit confused regarding routes. > > Consider a routing example > > it "should map { :controller => 'channels', :action => 'new' } to > /channels/new" do > route_for(:controller => "channels", :action => "new").should == > "/channels/new" > end > > Now i can see all the routing methods by rake routes.In that i can see > this new action defined. > > Now imagine if i write an action which is not defined in the rake routes > then instead of failing it is passing.For e.g. > > it "should map { :controller => 'channels', :action => 'test' } to > /channels/test" do > route_for(:controller => "channels", :action => "test").should == > "/channels/test" > end > > Now here 'test' action is not defined in the routes.So it should fail > but it isn't. > May be i am missing something here. > -- >
Are you sure you have the default last two lines commented out in routes.rb. If you haven't they will match that action - I think. All best Andrew > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users