So I'm trying to write a completely restful application and I am
trying to write controller tests ( well actually controller specs, but
the problem is the same )
I wanted to write something like
post 'games', {:game=>{:name =>'test'}}
which I expected to execute the create action on my controller (being
restful and everything )
Instead I got:
No route matches {:controller=>"games", :action=>"games",
:game=>{:name=>"test"}}
So instead, I had to use
post 'create', {:game=>{:name =>'test'}}
This works, but:
1) It requires me to have the old default restless route in my
routes.rb, and I wanted to remove that to force restful access
2) Its just kinda odd. The 'post' seems superflous in the restful
world, and If I'm just going to specify the action method to call, why
go through routing at all?
Comments anyone? Am I off-base or is this a bit ugly?
cheers
Perryn