From fb3ed36188abf9a40d485757f9f894f1d9011f56 Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Thu, 25 Feb 2010 16:40:48 -0500 Subject: [PATCH] minor: test fixes --- test/grid_store_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/grid_store_test.rb b/test/grid_store_test.rb index 31810a0..e514878 100644 --- a/test/grid_store_test.rb +++ b/test/grid_store_test.rb @@ -130,7 +130,6 @@ class GridStoreTest < Test::Unit::TestCase } assert_equal 3, @@chunks.count - #assert_equal ('x' * size) + ('y' * size) + ('z' * size), GridStore.read(@@db, 'biggie') end def test_binary @@ -140,8 +139,12 @@ class GridStoreTest < Test::Unit::TestCase end file.rewind + data = file.read + if data.respond_to?(:force_encoding) + data.force_encoding(:binary) + end GridStore.open(@@db, 'zip', 'r') do |f| - assert_equal file.read.length, f.read.length + assert_equal data.length, f.read.length end end