Reputation: 329
Right now I have one
#routes.rb
scope module: "api" do
namespace :v1 do
and in my rspec folder structure I have
spec
└── requests
└── v1
└── files
I want to create another namespace on a different scope so I'm changing my routes.rb to
scope module: "api" do
namespace :v1 do
...
scope module: "another-api" do
namespace :v1 do
Would this be the right path here to keep my file structure organized?
spec
└── requests
├── api
│ └── v1
│ └── files
└── other-api
└── v1
└── files
Upvotes: 0
Views: 287
Reputation: 22926
Looks about right. Keeping the route definition/source files/test files in the same hierarchical structure helps developers to quickly refer a file, helps the IDE to navigate between test & source file using keyboard shortcuts.
Upvotes: 1