in_array 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/irbt.rb +0 -2
- data/lib/in_array/version.rb +1 -1
- data/tests/in_array_test.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a3a23c19e1912a8336561b9b2aff66455237480
|
4
|
+
data.tar.gz: ebf2da7fc14ebc115ced205aee335a57d0acc42f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f4e573e8e5f2cd60b44dbf0a17f743e2df3ac39b287aab083660d0d4e26c4b646a606a948fa2785eff5b3209dffafd0bb66d0a47f5126a98c7de1465548796b
|
7
|
+
data.tar.gz: 97607337e8ca29c07538fe3db442309a3b2251c61278aa685f8a74adb4a0ff857196e7f36a26dda51eae0b959266bd06a0010abd632f9c62b190bf84a0c9ccaf
|
data/irbt.rb
CHANGED
data/lib/in_array/version.rb
CHANGED
data/tests/in_array_test.rb
CHANGED
@@ -3,6 +3,15 @@ gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
4
4
|
require 'minitest_visible'
|
5
5
|
|
6
|
+
class MyArray
|
7
|
+
include InArrayAlready
|
8
|
+
#Balance of class omitted.
|
9
|
+
end
|
10
|
+
|
11
|
+
class NotAnArray
|
12
|
+
#Balance of class omitted.
|
13
|
+
end
|
14
|
+
|
6
15
|
class InArrayTester < Minitest::Test
|
7
16
|
#Track mini-test progress.
|
8
17
|
include MinitestVisible
|
@@ -23,4 +32,12 @@ class InArrayTester < Minitest::Test
|
|
23
32
|
def test_that_it_leaves_arrays_alone
|
24
33
|
assert_equal([1,2,3].in_array, [1,2,3])
|
25
34
|
end
|
35
|
+
|
36
|
+
def test_with_custom_classes
|
37
|
+
foo = MyArray.new
|
38
|
+
assert_equal(foo, foo.in_array)
|
39
|
+
|
40
|
+
bar = NotAnArray.new
|
41
|
+
assert_equal([bar], bar.in_array)
|
42
|
+
end
|
26
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: in_array
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest_visible
|