memcache_mock 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,8 +34,16 @@ class MemcacheMock
34
34
  @values[key] += value
35
35
  end
36
36
  end
37
+
38
+ def delete(key)
39
+ @values.delete(key)
40
+ end
37
41
 
38
42
  def flush
39
43
  @values.clear
40
44
  end
45
+
46
+ def flush_all
47
+ flush
48
+ end
41
49
  end
@@ -1,3 +1,3 @@
1
1
  class MemcacheMock
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -60,4 +60,11 @@ class MemcacheMockTest < Test::Unit::TestCase
60
60
  @cache.flush
61
61
  assert_equal( nil, @cache.get( "key" ) )
62
62
  end
63
+
64
+ def test_delete
65
+ @cache.set( "key", "value1" )
66
+ assert_equal( "value1", @cache.get( "key" ) )
67
+ @cache.delete( "key" )
68
+ assert_nil( @cache.get( "key" ) )
69
+ end
63
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memcache_mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,12 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-26 00:00:00.000000000 +01:00
14
- default_executable:
13
+ date: 2012-02-09 00:00:00.000000000Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: bundler
18
- requirement: &2157273340 !ruby/object:Gem::Requirement
17
+ requirement: &70192132092780 !ruby/object:Gem::Requirement
19
18
  none: false
20
19
  requirements:
21
20
  - - =
@@ -23,10 +22,10 @@ dependencies:
23
22
  version: 1.0.21
24
23
  type: :development
25
24
  prerelease: false
26
- version_requirements: *2157273340
25
+ version_requirements: *70192132092780
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rake
29
- requirement: &2157272840 !ruby/object:Gem::Requirement
28
+ requirement: &70192132092120 !ruby/object:Gem::Requirement
30
29
  none: false
31
30
  requirements:
32
31
  - - =
@@ -34,10 +33,10 @@ dependencies:
34
33
  version: 0.9.2.2
35
34
  type: :development
36
35
  prerelease: false
37
- version_requirements: *2157272840
36
+ version_requirements: *70192132092120
38
37
  - !ruby/object:Gem::Dependency
39
38
  name: mocha
40
- requirement: &2157272380 !ruby/object:Gem::Requirement
39
+ requirement: &70192132091500 !ruby/object:Gem::Requirement
41
40
  none: false
42
41
  requirements:
43
42
  - - =
@@ -45,7 +44,7 @@ dependencies:
45
44
  version: 0.10.0
46
45
  type: :development
47
46
  prerelease: false
48
- version_requirements: *2157272380
47
+ version_requirements: *70192132091500
49
48
  description: Simple key/value mocked storage system
50
49
  email:
51
50
  - fguillen.mail@gmail.com
@@ -65,7 +64,6 @@ files:
65
64
  - memcache_mock.gemspec
66
65
  - test/memcache_mock_test.rb
67
66
  - test/test_helper.rb
68
- has_rdoc: true
69
67
  homepage: https://github.com/fguillen/MemcacheMock
70
68
  licenses: []
71
69
  post_install_message:
@@ -78,15 +76,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
76
  - - ! '>='
79
77
  - !ruby/object:Gem::Version
80
78
  version: '0'
79
+ segments:
80
+ - 0
81
+ hash: 2848083593305837614
81
82
  required_rubygems_version: !ruby/object:Gem::Requirement
82
83
  none: false
83
84
  requirements:
84
85
  - - ! '>='
85
86
  - !ruby/object:Gem::Version
86
87
  version: '0'
88
+ segments:
89
+ - 0
90
+ hash: 2848083593305837614
87
91
  requirements: []
88
92
  rubyforge_project: memcache_mock
89
- rubygems_version: 1.6.2
93
+ rubygems_version: 1.8.15
90
94
  signing_key:
91
95
  specification_version: 3
92
96
  summary: Simple key/value mocked storage system