object_pool 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/object_pool.rb +4 -1
- data/lib/object_pool/version.rb +1 -1
- data/spec/object_pool_spec.rb +6 -2
- metadata +1 -1
data/lib/object_pool.rb
CHANGED
data/lib/object_pool/version.rb
CHANGED
data/spec/object_pool_spec.rb
CHANGED
@@ -11,6 +11,7 @@ describe ObjectPool do
|
|
11
11
|
@pool = ObjectPool::Pool.new @pool_path
|
12
12
|
@fixture_data = "This is a test file."
|
13
13
|
@fixture_md5 = Digest::MD5.hexdigest(@fixture_data)
|
14
|
+
@fixture_size = @fixture_data.bytesize
|
14
15
|
end
|
15
16
|
|
16
17
|
describe '#initialize' do
|
@@ -24,8 +25,11 @@ describe ObjectPool do
|
|
24
25
|
@object_id = @pool.put(@fixture_data)
|
25
26
|
end
|
26
27
|
|
27
|
-
it '
|
28
|
-
@object_id.should ==
|
28
|
+
it '回傳值應該是正確的' do
|
29
|
+
@object_id.should == {
|
30
|
+
:object_id => @fixture_md5,
|
31
|
+
:size => @fixture_size
|
32
|
+
}
|
29
33
|
end
|
30
34
|
|
31
35
|
it '新增後檔案應該存在' do
|