Skip to content

Can't seem to match nested routes #273

@wwkeyboard

Description

@wwkeyboard

When setting up a basic rails 3 application it seems like rspec-rails is unable to test nested routes. I've included a basic setup that should enable anyone to reproduce the error. This is present on both 2.1.0 and on master. One quick work around is to create a route directly to the controller.

routes.rb :

Testrspec2::Application.routes.draw do
  resources :two do
    resources :one
  end
end

one_controller_spec.rb :

require 'spec_helper'

describe OneController do
  it "should be successful" do
    get "index"
    response.should be_success
  end
end

one_controller.rb :

class OneController < ApplicationController
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions