Routing errors with Rails 3.0.1 and Rspec 2.0.1

I’m sure something is borked in my app, but I can’t seem to track it
down. A few commits back, my app was fully passing my spec suite. It
was on Rails 3.0.0 and Rspec 2.0.0.beta.20. I’ve now upgraded to
rails 3.0.1 and rspec 2.0.1 Now, I’m getting tons, and I mean tons of
failures that say things like, to take a simple case:

  1. SiteController GET ‘about’ should be successful
    Failure/Error: get ‘about’
    No route matches {:action=>“about”, :controller=>“site”}


Here’s the spec:

describe “GET ‘about’” do
it “should be successful” do
get ‘about’
response.should be_success

And the defined route showing up in rake routes

about GET /
{:controller=>“site”, :action=>“about”}

This fails if I run rspec by ‘rake routes’ or by ‘bundle exec
autotest’. But, and here’s the weird thing, if I cause autotest to
run that file again, or if I manually run bundle exec rspec spec/
controllers/site_controller_spec.rb, then it passes just fine.

Did I miss something I needed to do in my upgrade? If it matters I’m
using rvm gemsets.

Thanks for any guidance.

On Oct 19, 2010, at 7:07 PM, Trey wrote:

I’m sure something is borked in my app, but I can’t seem to track it

Me too, and routing as well …

constraints( :subdomain => /.+/ ) do
match ‘/dashboard’ => ‘users#show’

it "routes '' to 

UsersController#dashboard with subdomain ‘test’" do
{ :get => ‘’ }.should route_to(
:controller => ‘users’, :action => ‘show’, :subdomain => ‘test’

This fails, and unless I’m not crazy a very similar example was made by
David himself some time ago:

rails 3.0.1 and rspec 2.0.0 (and rvm too)

Did we miss something ?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs