diff options
-rw-r--r-- | actionpack/test/controller/layout_test.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb index 38c4baceb0..d8b04119f2 100644 --- a/actionpack/test/controller/layout_test.rb +++ b/actionpack/test/controller/layout_test.rb @@ -81,7 +81,8 @@ end class StreamingLayoutController < LayoutTest def render(*args) options = args.extract_options! - super(*args, options.merge(:stream => true)) + options[:stream] = true + super(*(args << options)) end end @@ -129,10 +130,12 @@ class LayoutSetInResponseTest < ActionController::TestCase assert_template :layout => "layouts/layout_test" end - def test_layout_set_when_using_streaming_layout - @controller = StreamingLayoutController.new - get :hello - assert_template :hello + if RUBY_VERSION >= '1.9' + def test_layout_set_when_using_streaming_layout + @controller = StreamingLayoutController.new + get :hello + assert_template :hello + end end def test_layout_set_when_set_in_controller |