better_struct 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/better_struct/version.rb +1 -1
- data/lib/better_struct.rb +1 -1
- data/test/better_struct_test.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7412170d20c983591a234c44890b2193d6de770b
|
4
|
+
data.tar.gz: 33be1a359fde94fc3a4e12456f1fd2bb334a0246
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a5c7bf02dad0688bdd984d6f14561ecc92d032d50f8c56176dfad561ac6fb4fd01f5d42b3041a2845700a84a3839a520b379cef8ec0bad4a79fb92d5791149f
|
7
|
+
data.tar.gz: 540cac12c69851eafbd2d43070c0df506f763a3a2a2fa9691cc21a8a2f0ec02ede6c264dcad5321fb73e8a60ef0376438b2622bd4a01c552db1d60b87c43e02a
|
data/lib/better_struct.rb
CHANGED
data/test/better_struct_test.rb
CHANGED
@@ -54,4 +54,13 @@ class BetterStructTest < Minitest::Test
|
|
54
54
|
assert !i.is_a?(BetterStruct)
|
55
55
|
end
|
56
56
|
end
|
57
|
+
|
58
|
+
def test_equality
|
59
|
+
assert BetterStruct.new(1) == BetterStruct.new(1.0)
|
60
|
+
assert BetterStruct.new(1) != 1
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_underscoring_methods
|
64
|
+
assert BetterStruct.new({ "Word With-Space" => 1 }).word_with_space.value == 1
|
65
|
+
end
|
57
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_struct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeny Li
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|