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.
On Sep 9, 2010, at 12:22 PM, Lee S. 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 B.
[email protected] http://AgileConsultingLLC.com/
[email protected] http://GaslightSoftware.com/
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