やりたいこと 1つのRailsアプリを複数のドメインで運用し、ドメイン別に同じパスでも別々のコントローラを割り当てる必要があった。 Cucumberのフィーチャでもそれがどのドメインでのアクセスかわかるように書いて、受け入れテストにも反映させたい。↓こういうこと。 http://hoge.xxx/posts Hoge::Posts#index http://a.fuga.xxx/ Fuga1::Posts#index http://b.fuga.xxx/ Fuga2::Pages#index 方法 config/routes.rb require 'myapp1/constraint' MyApp::Application.routes.draw do constraints MyApp::Constraint.new(:hoge) do namespace :hoge, :path =