I''m having a hard time getting rspec-rails setup in a Rails 3 app. I''m using ruby 1.9.2, rails 3.0.0 and rspec-rails 2.0.0.beta.20. In my integration test, I''m using webrat to test a "visit" to a page. I get an "undefined local variable" error for the route: visit new_articles_path Have I missed something in my setup? I followed the basic install instructions for both rspec-rails and webrat but can''t seem to get passed this error. Thanks for any help. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sep 9, 2010, at 12:22 PM, Lee Smith wrote:> I''m having a hard time getting rspec-rails setup in a Rails 3 app. > I''m using ruby 1.9.2, rails 3.0.0 and rspec-rails 2.0.0.beta.20. In > my integration test, I''m using webrat to test a "visit" to a page. I > get an "undefined local variable" error for the route: > > visit new_articles_path > > Have I missed something in my setup? I followed the basic install > instructions for both rspec-rails and webrat but can''t seem to get > passed this error. Thanks for any help.Are you sure that you''re using the correct named route? Run: rake routes and look for new_.* to see what Rails is looking for. (You should find the answer obvious.) -Rob Rob Biedenharn Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org http://AgileConsultingLLC.com/ rab-/VpnD74mH8+00s0LW7PaslaTQe2KTcn/@public.gmane.org http://GaslightSoftware.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yes, here''s the example setup I''ve put together. I''m using a Post model and posts_path definitely exists. http://gist.github.com/572213 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.