cache-client 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/cache-client.rb +1 -0
- data/lib/cache-client/version.rb +2 -2
- data/spec/cache_client_spec.rb +12 -0
- metadata +1 -1
data/CHANGELOG.md
CHANGED
data/lib/cache-client.rb
CHANGED
data/lib/cache-client/version.rb
CHANGED
data/spec/cache_client_spec.rb
CHANGED
@@ -38,6 +38,18 @@ describe Cache::Client do
|
|
38
38
|
client.backend.args.must_equal([1, 2, 3, {'four' => :five}])
|
39
39
|
end
|
40
40
|
|
41
|
+
it "uses the noop backend if all arguments are nil" do
|
42
|
+
client = Cache::Client.new(Cache::InMemoryBackend, 1, 2, 3, {'four' => :five})
|
43
|
+
client.backend.kind_of?(Cache::InMemoryBackend).must_equal true
|
44
|
+
|
45
|
+
client = Cache::Client.new(Cache::InMemoryBackend)
|
46
|
+
client.backend.kind_of?(Cache::InMemoryBackend).must_equal true
|
47
|
+
|
48
|
+
client = Cache::Client.new(Cache::InMemoryBackend, nil)
|
49
|
+
client.backend.kind_of?(Cache::InMemoryBackend).must_equal false
|
50
|
+
client.backend.kind_of?(Cache::Backend::NoopBackend).must_equal true
|
51
|
+
end
|
52
|
+
|
41
53
|
describe "that are initialized" do
|
42
54
|
before do
|
43
55
|
@client = Cache::Client.new(Cache::InMemoryBackend)
|