3
だから私はこのようになりますルートがあります。RoutingError
scope "4" do
scope "public" do
scope ":apikey" do
resources :shops
end
end
end
そして、このようになります。その一例が、コントローラの仕様の束、:
describe ShopsController do
describe "when responding to a GET" do
context "#new" do
it "should create a new instance of the shop class" do
get :new
@shop.should_not_be_nil
end
end
end
end
をレーキルートでは、ウェブブラウザを介して、このコントローラ/アクションは正常に動作します。しかし、RSpec throw:
1) ShopsController when responding to a GET#new should create a new instance of the shop class
Failure/Error: get :new
ActionController::RoutingError:
No route matches {:controller=>"shops", :action=>"new"}
# ./spec/controllers/shops_controller_spec.rb:9:in `block (4 levels) in <top (required)>'
私はルートからscope
ステートメントを削除すると、テストは正常に動作します。ルートスコープのRSpecに「通知」する方法はありますか?
ありがとうございます!あなたのルートによると
はチャンピオンのように働いた。ありがとうございました! – ianm