From 9fadf385d892931190b465b691ecef796f0eea5c Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Fri, 17 Jun 2011 18:17:28 +0200 Subject: calling unsafe methods which don't return a string shouldn't fail --- activesupport/test/safe_buffer_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb index a8b39d2c38..08cc00ac51 100644 --- a/activesupport/test/safe_buffer_test.rb +++ b/activesupport/test/safe_buffer_test.rb @@ -104,4 +104,8 @@ class SafeBufferTest < ActiveSupport::TestCase @buffer.safe_concat "BUSTED" end end + + test "should not fail if the returned object is not a string" do + assert_kind_of Enumerator, @buffer.gsub(/.*/) + end end -- cgit v1.2.3