dot_hash 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dot_hash/properties.rb +1 -0
- data/lib/dot_hash/settings.rb +2 -2
- data/lib/dot_hash/version.rb +1 -1
- data/test/dot_hash/properties_test.rb +10 -0
- data/test/dot_hash/settings_test.rb +2 -0
- metadata +3 -3
data/lib/dot_hash/properties.rb
CHANGED
data/lib/dot_hash/settings.rb
CHANGED
data/lib/dot_hash/version.rb
CHANGED
@@ -59,6 +59,16 @@ module DotHash
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
describe "#to_hash" do
|
63
|
+
before do
|
64
|
+
@properties = Properties.new user: { name: "dude" }
|
65
|
+
end
|
66
|
+
|
67
|
+
it "returns a hash" do
|
68
|
+
properties.to_hash.must_equal user: {name: "dude"}
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
62
72
|
describe "#respond_to?" do
|
63
73
|
before do
|
64
74
|
@properties = Properties.new speed: "15",
|
@@ -12,10 +12,12 @@ module DotHash
|
|
12
12
|
|
13
13
|
it "gets hash properties" do
|
14
14
|
settings.site.must_equal "skyo.com"
|
15
|
+
settings[:site].must_equal "skyo.com"
|
15
16
|
end
|
16
17
|
|
17
18
|
it "gets a nested hash property" do
|
18
19
|
settings.facebook.api.must_equal "123"
|
20
|
+
settings['facebook']['api'].must_equal "123"
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dot_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -66,7 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
66
|
version: '0'
|
67
67
|
segments:
|
68
68
|
- 0
|
69
|
-
hash:
|
69
|
+
hash: 899670426166528458
|
70
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
71
|
none: false
|
72
72
|
requirements:
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
version: '0'
|
76
76
|
segments:
|
77
77
|
- 0
|
78
|
-
hash:
|
78
|
+
hash: 899670426166528458
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
81
|
rubygems_version: 1.8.24
|