1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test/controller/render_other_test.rb
2011-04-13 13:23:17 +02:00

21 lines
484 B
Ruby

require 'abstract_unit'
ActionController.add_renderer :simon do |says, options|
self.content_type = Mime::TEXT
self.response_body = "Simon says: #{says}"
end
class RenderOtherTest < ActionController::TestCase
class TestController < ActionController::Base
def render_simon_says
render :simon => "foo"
end
end
tests TestController
def test_using_custom_render_option
get :render_simon_says
assert_equal "Simon says: foo", @response.body
end
end