Namespace
Methods
S
T
Instance Public methods
setup()
# File actionpack/test/controller/render_xml_test.rb, line 47
def setup
  # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
  # a more accurate simulation of what happens in "real life".
  super
  @controller.logger = Logger.new(nil)

  @request.host = "www.nextangle.com"
end
test_rendering_with_location_should_set_header()
# File actionpack/test/controller/render_xml_test.rb, line 56
def test_rendering_with_location_should_set_header
  get :render_with_location
  assert_equal "http://example.com", @response.headers["Location"]
end
test_rendering_with_object_location_should_set_header_with_url_for()
# File actionpack/test/controller/render_xml_test.rb, line 71
def test_rendering_with_object_location_should_set_header_with_url_for
  with_routing do |set|
    set.draw do
      resources :customers
      match ':controller/:action'
    end

    get :render_with_object_location
    assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"]
  end
end
test_rendering_xml_should_call_to_xml_if_possible()
# File actionpack/test/controller/render_xml_test.rb, line 61
def test_rendering_xml_should_call_to_xml_if_possible
  get :render_with_to_xml
  assert_equal "<i-am-xml/>", @response.body
end
test_rendering_xml_should_call_to_xml_with_extra_options()
# File actionpack/test/controller/render_xml_test.rb, line 66
def test_rendering_xml_should_call_to_xml_with_extra_options
  get :render_xml_with_custom_options
  assert_equal "<i-am-THE-xml/>", @response.body
end
test_should_render_formatted_xml_erb_template()
# File actionpack/test/controller/render_xml_test.rb, line 83
def test_should_render_formatted_xml_erb_template
  get :formatted_xml_erb, :format => :xml
  assert_equal '<test>passed formatted xml erb</test>', @response.body
end
test_should_render_xml_but_keep_custom_content_type()
# File actionpack/test/controller/render_xml_test.rb, line 88
def test_should_render_xml_but_keep_custom_content_type
  get :render_xml_with_custom_content_type
  assert_equal "application/atomsvc+xml", @response.content_type
end
test_should_use_implicit_content_type()
# File actionpack/test/controller/render_xml_test.rb, line 93
def test_should_use_implicit_content_type
  get :implicit_content_type, :format => 'atom'
  assert_equal Mime::ATOM, @response.content_type
end