diff options
author | Brian Cardarella <bcardarella@gmail.com> | 2011-07-29 13:06:45 -0400 |
---|---|---|
committer | Brian Cardarella <bcardarella@gmail.com> | 2011-07-29 13:10:31 -0400 |
commit | 6ef1079e0ed093e54a0e1dc9cb3b97d5e1330caf (patch) | |
tree | b0e3f615a6d48f00065b3172d5d76430af049642 /activesupport/test/safe_buffer_test.rb | |
parent | 270fa63e9b16ae31371afa199d4de72afc41ac93 (diff) | |
download | rails-6ef1079e0ed093e54a0e1dc9cb3b97d5e1330caf.tar.gz rails-6ef1079e0ed093e54a0e1dc9cb3b97d5e1330caf.tar.bz2 rails-6ef1079e0ed093e54a0e1dc9cb3b97d5e1330caf.zip |
Reset @dirty to false when slicing an instance of SafeBuffer
Diffstat (limited to 'activesupport/test/safe_buffer_test.rb')
-rw-r--r-- | activesupport/test/safe_buffer_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb index 7662e9b765..8f77999d25 100644 --- a/activesupport/test/safe_buffer_test.rb +++ b/activesupport/test/safe_buffer_test.rb @@ -106,4 +106,10 @@ class SafeBufferTest < ActiveSupport::TestCase test "should not fail if the returned object is not a string" do assert_kind_of NilClass, @buffer.slice("chipchop") end + + test "Should initialize @dirty to false for new instance when sliced" do + dirty = @buffer[0,0].send(:dirty?) + assert_not_nil dirty + assert !dirty + end end |