jonleighton / focused_controller

MIT License
468 stars 27 forks source link

Routing rspec matcher doesn't works #13

Closed shingara closed 12 years ago

shingara commented 12 years ago

On my project I have a route :

focused_controller_routes do
  resources :urls
end

I want test it on my rspec routing like :

describe "url resource" do
  it 'should see /urls' do
    get('/urls').should route_to(
      :controller => 'urls::index',
      :action => 'run'
    )   
  end 
end

But it's failed :

  1) url resource should see /urls
     Failure/Error: get('/urls').should route_to(
       No route matches "/urls"
     # ./spec/routing_spec.rb:5:in `block (2 levels) in <top (required)>'
jonleighton commented 12 years ago

Thanks for the report, but I'm going to close it. TBH I see no reason to write RSpec route tests. I test my routes implicitly through end-to-end acceptance tests (i.e. capybara).