From dccc20aff3b4468a1b4721ffcc7f7b48ade474e9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Nov 2010 17:37:36 +0000 Subject: test: minor cleanup to share @uri We'll be using @uri in more tests --- test/test_tokyocabinet_hdb.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_tokyocabinet_hdb.rb b/test/test_tokyocabinet_hdb.rb index 31a77d7..f973b69 100644 --- a/test/test_tokyocabinet_hdb.rb +++ b/test/test_tokyocabinet_hdb.rb @@ -7,12 +7,13 @@ $-w = true require 'metropolis' class TestTokyocabinetHDB < Test::Unit::TestCase - attr_reader :tmp, :o + attr_reader :tmp, :o, :uri def setup tmp = Tempfile.new('tchdb') @path_pattern = tmp.path + ".%01x.tch" tmp.close! + @uri = "tc://#{@path_pattern}" end def teardown @@ -167,7 +168,6 @@ class TestTokyocabinetHDB < Test::Unit::TestCase k = "x" nr_bytes = 1024 * 1024 * 20 data = "0" * nr_bytes - uri = "tc://#{@path_pattern}" obj = nil assert_nothing_raised { obj = Metropolis.new(:uri => uri) } -- cgit v1.2.3-24-ge0c7