rubyfox-sfsobject 0.3.0-java → 0.4.0-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,14 @@ module Rubyfox
24
24
  def []=(key, value)
25
25
  Bulk.wrap_value!(self, key, value)
26
26
  end
27
+
28
+ def key?(key)
29
+ contains_key(key)
30
+ end
31
+
32
+ def delete(key)
33
+ remove_element(key)
34
+ end
27
35
  end
28
36
  end
29
37
  end
@@ -1,5 +1,5 @@
1
1
  module Rubyfox
2
2
  module SFSObject
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -24,6 +24,19 @@ class RubyfoxSFSObjectAccessorTest < RubyfoxCase
24
24
  end
25
25
  end
26
26
 
27
+ test "key?" do
28
+ assert_equal false, sfs_object.key?(:foo)
29
+ sfs_object[:foo] = "bar"
30
+ assert_equal true, sfs_object.key?(:foo)
31
+ end
32
+
33
+ test "delete" do
34
+ sfs_object[:foo] = "bar"
35
+ assert sfs_object.key?(:foo)
36
+ sfs_object.delete(:foo)
37
+ refute sfs_object.key?(:foo)
38
+ end
39
+
27
40
  context "plain" do
28
41
  test "nil" do
29
42
  assert_accessor :null => nil
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: rubyfox-sfsobject
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.0
5
+ version: 0.4.0
6
6
  platform: java
7
7
  authors:
8
8
  - Peter Suschlik
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-15 00:00:00.000000000 Z
12
+ date: 2012-11-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake