module ThoughtBot::Shoulda::Controller::XML::ClassMethods

def make_show_xml_tests(res) # :nodoc:

:nodoc:
def make_show_xml_tests(res) # :nodoc:
  context "on GET to #{controller_name_from_class}#show as xml" do
    setup do
      request_xml
      record = get_existing_record(res)
      parent_params = make_parent_params(res, record)
      get :show, parent_params.merge({ res.identifier => record.to_param })          
    end
    if res.denied.actions.include?(:show)
      should_not_assign_to res.object
      should_respond_with 401
    else
      should_assign_to res.object          
      should_respond_with :success
      should_respond_with_xml_for res.object
    end
  end
end