I am working on a Rails 3 application using RSPec 2.beta.20.

I am having the following routes in my routes.rb

routes.rb
------------
resources :projects
root :to => 'projects#index'

I am trying to test both the routes. But while testing root route I am
getting a failure :

it 'should route root to projects#index' do
  {:get => '/'}.should route_to(:controller => 'projects', :action =>
'index')
end

But the above example is failing since route_to is expecting a route like
'/projects'. Is there a way to test root routes which are also configured
elsewhere in the routes.rb.

Regards,
Amiruddin Nagri,
Bangalore, 560008, KA
India

Y! IM : amir_na...@yahoo.com
GTalk : amir.na...@gmail.com
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to