Hi all,

I must be doing something wrong here. Could someone point me in the
right direction? I am trying to test my nested resources in Rails 3.

The route:
  resources :students do
    resources :days
  end

The test:
      it "recognizes and generates #index" do
        { :get => "/students/1/days" }.should route_to(:controller =>
"days", :action => "index", :student_id => "1")
      end

The error:
1) DaysController routing nested in students recognizes and generates #index
    Failure/Error: { :get => "/students/1/days" }.should
route_to(:student_id => "1", :controller => "days", :action =>
"index")
    found extras <{:student_id=>"1"}>, not <{}>

The route works find in the browser, I just don't know what I am
missing to make the test pass.

Yours,
Trevor
-- 
Trevor Lalish-Menagh
484.868.6150 mobile
t...@trevreport.org
http://www.trevmex.com/
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to