about summary refs log tree commit
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-11-23 17:37:36 +0000
committerEric Wong <normalperson@yhbt.net>2010-11-23 17:37:36 +0000
commitdccc20aff3b4468a1b4721ffcc7f7b48ade474e9 (patch)
tree0bb63aacccb0b656e68ee87e54431c43d42c067b
parent5eb8bf5e005d0d800af0c7e5e2dfd6b2526dd218 (diff)
downloadmetropolis-dccc20aff3b4468a1b4721ffcc7f7b48ade474e9.tar.gz
test: minor cleanup to share @uri
We'll be using @uri in more tests
-rw-r--r--test/test_tokyocabinet_hdb.rb4
1 files 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) }