Sha256: 2fb0fe5257336e4f42ab273e70425b1d6a66af2e3ef84791d47693253bf0a4b2

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

Feature: Features integration

  Background:
    When I generate a new rails application
    And I generate resources "user post comment likes role account"
    And I generate resources "user post comment likes role account" in namespace "admin"
    And I generate resources "user post comment likes role account" in namespace "admin::control"
    And I configure the application to use rspec-rails
    And I run the rspec generator
    And I configure the application to use "shoulda_routing"

  Scenario: Support nested namespaces
    Given I write to "config/routes.rb" with:
      """
      TestApp::Application.routes.draw do
        namespace :admin do
          resources :users do
            resources :posts, :comments
          end

          namespace :control do
            resources :roles, only: :index
            resources :accounts, except: :destroy
          end
        end

        resources :users do
          resources :posts, :comments
        end
      end
      """
    And I write to "spec/routing/routing_spec.rb" with:
      """
      require 'spec_helper'

      describe 'Routes' do
        namespace :admin do
          resources :users do
            resources :posts, :comments
          end

          namespace :control do
            resources :roles, only: :index
            resources :accounts, except: :update
          end
        end

        resources :users do
          resources :posts, :comments, :likes
        end
      end
      """
    When I run routing specs
    Then the output should contain "63 examples, 9 failures"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoulda_routing-0.0.2 features/integration.feature