On Sat, Mar 8, 2008 at 8:51 PM, 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?
Seems reasonable to me. > > -- > 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
