I've always used do_post/do_put etc. But your way is perfectly acceptable :)
Pat On 3/8/08, Zach Dennis <[EMAIL PROTECTED]> wrote: > I'm heading out of town, but had a quick thought I wanted to share. > Rather then using ambiguous named request helpers in controller specs > like "do_request", I've been using more readable helpers like > "post_create". > > For example... > > describe ProjectController do > def post_create > post :create, ... > end > > before do > end > > it "creates a new project" do > Project.should_receive(:create).with(....) > post_create > end > > end > > IMO is adds a little more readability when looking at an individual > "it" behavior on a controller spec. We've been keeping the request > helpers as the first things immediately following a controller > specification, ie: "describe SomeController do". > > Thoughts? > > -- > Zach Dennis > http://www.continuousthinking.com > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
