better_struct 0.2.1 → 0.2.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.rb +4 -0
- data/lib/better_struct/version.rb +1 -1
- data/test/better_struct_test.rb +12 -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: 262cd7ded259c467148ba2682fc571feec48a498
|
4
|
+
data.tar.gz: 141737a24c6d7251e08c22ad26c28d222ba12d1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a52d2c6cdda7576685cc97ba9108121d5b9f8b60f817b8a1f8195614d1adc603ecb0e2b7e13fe60d6fbfc5d73b5848591f1d33feb2054133f8356dac1aed626e
|
7
|
+
data.tar.gz: 0038c03c2694d9520e7d8f8749343fbb2179549076607eb3513ba6e66cf7de4896cdacef7ad82db4d7ba5285f906d34706ef6ff510eebdfb8968de561fc243a4
|
data/lib/better_struct.rb
CHANGED
data/test/better_struct_test.rb
CHANGED
@@ -33,6 +33,18 @@ module BetterStructTest
|
|
33
33
|
assert better_struct.to_s == "1"
|
34
34
|
end
|
35
35
|
|
36
|
+
def test_empty
|
37
|
+
better_struct = BetterStruct.new([])
|
38
|
+
|
39
|
+
assert better_struct.empty? == true
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_not_empty
|
43
|
+
better_struct = BetterStruct.new(1)
|
44
|
+
|
45
|
+
assert better_struct.empty? == false
|
46
|
+
end
|
47
|
+
|
36
48
|
def test_block_argument_wrapping
|
37
49
|
better_struct = BetterStruct.new([3, 2, 1])
|
38
50
|
|
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.2.
|
4
|
+
version: 0.2.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-03-
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|