I''m new with rspec and using rails 1.2.3, and plugins (rspec/rspec_on_rails 1.0.5). Followed tutorials by lukeredpath and rspec''s writing tutorial at their site. I have an agencies controller, thus creating spec files for this controller:- spec/controllers/agencies_controller_spec.rb ------------------------------------------- require File.dirname(__FILE__) + ''/../spec_helper'' describe AgenciesController do #Delete this example and add some real ones it "should use AgenciesController" do controller.should be_an_instance_of(AgenciesController) end end describe AgenciesController, "#route_for" do it "should map { :controller => ''agencies'', :action => ''index'' } to /agencies" do route_for(:controller => "agencies", :action => "index").should ="/agencies" end end ------------------------------------------- when I run it - ruby script/spec spec/controllers/agencies_controller_spec.rb I get these errors ------------------------------------------- 1) NameError in ''AgenciesController should use AgenciesController'' undefined local variable or method `controller'' for [Dynamically generated class for RSpec example]:#<Class:0x464f088> ./spec\controllers\agencies_controller_spec.rb:7: script/spec_server:23:in `run'' script/spec_server:44: 2) NoMethodError in ''AgenciesController#route_for should map { :controller => ''agen cies'', :action => ''index'' } to /agencies'' undefined method `route_for'' for [Dynamically generated class for RSpec example] :#<Class:0x46426bc> ./spec\controllers\agencies_controller_spec.rb:15: script/spec_server:23:in `run'' script/spec_server:44: Finished in 0.016 seconds 2 examples, 2 failures ------------------------------------------- anyone know what went wrong? since I can run my model specs, and it seems that route_for is native to rspec -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---