module ThoughtBot::Shoulda::Controller::HTML::ClassMethods
def make_new_html_tests(res)
def make_new_html_tests(res) context "on GET to #{controller_name_from_class}#new" do setup do record = get_existing_record(res) rescue nil parent_params = make_parent_params(res, record) get(:new, parent_params) end if res.denied.actions.include?(:new) should_not_assign_to res.object should_redirect_to res.denied.redirect should_set_the_flash_to res.denied.flash else should_respond_with :success should_assign_to res.object should_not_set_the_flash should_render_template :new should_render_a_form end end end