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?
Scott