From 626d0b157f5ccf8a42401e6a111432912331aa47 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 17 Jan 2013 10:27:21 -0200 Subject: Do not run this streaming test in Ruby 1.8, fix syntax error --- actionpack/test/controller/layout_test.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'actionpack') 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 -- cgit v1.2.3