Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Routes not recognized in RSpec 2/Rails 3.1.4
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Will Marshall  
View profile  
 More options Apr 25 2012, 11:59 pm
From: Will Marshall <willrj.marsh...@gmail.com>
Date: Wed, 25 Apr 2012 20:59:23 -0700 (PDT)
Local: Wed, Apr 25 2012 11:59 pm
Subject: Routes not recognized in RSpec 2/Rails 3.1.4
Hey guys,

I'm having a very tricky issue with the route matching in RSpec 2
(2.9.0)

I recently renamed a "resources" a route using ":path =>". My tests,
which were working before this change, are no longer able to recognize
the renamed route.

I've prepared a test-case illustrating the problem here:
https://gist.github.com/2495632

In a nutshell, I *always* get "No route matches
{:controller=>"health_quotes"}" even though A: I can access
health_quotes_url from within the spec, and B: I can do
Rails.application.routes.recognize_path("/health-insurance", :method
=> :get) and get valid routes.

All the routes work as expected when I run Webrick, and on the staging
server.

Does anyone have a clue what's going on here? Am I missing something
obvious, or is RSpec's route matching borked?

Thanks!
-W


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Chelimsky  
View profile  
 More options Apr 26 2012, 6:06 am
From: David Chelimsky <dchelim...@gmail.com>
Date: Thu, 26 Apr 2012 05:06:07 -0500
Local: Thurs, Apr 26 2012 6:06 am
Subject: Re: Routes not recognized in RSpec 2/Rails 3.1.4

There is no "RSpec's route matching" - the `get` method comes from the Rails test framework which rspec-rails exposes but generally doesn't intercept (there are exceptions, but not related to `get`). Try doing the same in a Rails' functional test and let us know if you see any different behavior.

Cheers,
David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »