Routing error for a nested controller and rspec

Hello,
I am getting a strange error when using rspec with nested routes

it ‘succeeds’ do
get :index, @parameters
response.should be_success
end

Failure/Error: get :index, @parameters
ActionController::RoutingError:
No route matches {:website=>#<Website id: 1, name: “Website1”,
base_url: “http://somewebsite1.net”, created_at: “2011-02-09
18:57:31”, updated_at: “2011-02-09
18:57:31”>, :controller=>“website_users”}

my routes.rb


resources :websites
resources :users, :controller => ‘website_users’
end

rake routes

website_users GET /websites/:website_id/
users(.:format)
{:action=>“index”, :controller=>“website_users”}
POST /websites/:website_id/
users(.:format)
{:action=>“create”, :controller=>“website_users”}
new_website_user GET /websites/:website_id/users/
new(.:format)
{:action=>“new”, :controller=>“website_users”}
edit_website_user GET /websites/:website_id/users/:id/
edit(.:format) {:action=>“edit”, :controller=>“website_users”}
website_user GET /websites/:website_id/
users/:id(.:format)
{:action=>“show”, :controller=>“website_users”}
PUT /websites/:website_id/
users/:id(.:format)
{:action=>“update”, :controller=>“website_users”}
DELETE /websites/:website_id/
users/:id(.:format)
{:action=>“destroy”, :controller=>“website_users”}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs