On 28/03/2007, at 12:42 PM, Scott Taylor wrote:
>
> I have several specs which do more or less the same thing:
>
> describe "GET /users/1/terms" do
> controller_name :terms
>
> def do_get
> get :index, :user_id => 1
> end
>
> it "should be successful" do
> controller.should_render :index
> do_get
> end
> ...
> end
>
>
> How could I extract this functionality from each spec?
but *should* you extract this functionality from each spec? Actions
change in complexity so often, and so what might look common and
repetitive now might end up differing quite significantly in a
month''s time.
-- tim