Closed
Description
spec is following:
it { should route(:get, '/api/v1/promotions/1').to(:controller => 'promotin/commons', :action => :show, id: 1) }
test failed with:
Promotion::CommonsController should route GET /api/v1/promotions/1 to/from {:controller=>"promotin/commons", :action=>"show", :id=>"1"}
Failure/Error: it { should route(:get, '/api/v1/promotions/1').to(:controller => 'promotin/commons', :action => :show, id: 1) }
The recognized options <{"action"=>"show", "controller"=>"promotion/commons", "id"=>"1"}> did not match <{"controller"=>"promotin/commons", "action"=>"show", "id"=>"1"}>, difference:.
--- expected
+++ actual
@@ -1 +1 @@
-{"controller"=>"promotin/commons", "action"=>"show", "id"=>"1"}
+{"action"=>"show", "controller"=>"promotion/commons", "id"=>"1"}
spec no :id args is worked.