mailgun 0.8 → 0.11
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/.gitignore +1 -0
- data/.travis.yml +13 -0
- data/CONTRIBUTORS.md +5 -1
- data/README.md +39 -2
- data/lib/mailgun.rb +6 -1
- data/lib/mailgun/address.rb +20 -0
- data/lib/mailgun/base.rb +45 -16
- data/lib/mailgun/client.rb +87 -0
- data/lib/mailgun/domain.rb +9 -4
- data/lib/mailgun/list/member.rb +9 -1
- data/lib/mailgun/mailgun_error.rb +54 -1
- data/lib/mailgun/route.rb +9 -4
- data/lib/mailgun/secure.rb +30 -0
- data/lib/mailgun/webhook.rb +55 -0
- data/lib/multimap/spec/enumerable_examples.rb +22 -22
- data/lib/multimap/spec/hash_examples.rb +88 -88
- data/lib/multimap/spec/multiset_spec.rb +62 -62
- data/lib/multimap/spec/nested_multimap_spec.rb +58 -58
- data/lib/multimap/spec/set_examples.rb +112 -112
- data/lib/multimap/spec/spec_helper.rb +2 -2
- data/mailgun.gemspec +3 -5
- data/spec/address_spec.rb +27 -0
- data/spec/base_spec.rb +31 -25
- data/spec/bounce_spec.rb +5 -5
- data/spec/client_spec.rb +118 -0
- data/spec/complaint_spec.rb +4 -4
- data/spec/domain_spec.rb +17 -5
- data/spec/helpers/mailgun_helper.rb +9 -0
- data/spec/list/member_spec.rb +7 -7
- data/spec/list/message_spec.rb +3 -3
- data/spec/list_spec.rb +6 -6
- data/spec/log_spec.rb +2 -2
- data/spec/mailbox_spec.rb +4 -4
- data/spec/route_spec.rb +10 -11
- data/spec/secure_spec.rb +55 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/unsubscribe_spec.rb +6 -6
- data/spec/webhook_spec.rb +115 -0
- metadata +22 -21
@@ -5,156 +5,156 @@ describe Multiset do
|
|
5
5
|
|
6
6
|
it "should return the multiplicity of the element" do
|
7
7
|
set = Multiset.new([:a, :a, :b, :b, :b, :c])
|
8
|
-
set.multiplicity(:a).
|
9
|
-
set.multiplicity(:b).
|
10
|
-
set.multiplicity(:c).
|
8
|
+
expect(set.multiplicity(:a)).to eql(2)
|
9
|
+
expect(set.multiplicity(:b)).to eql(3)
|
10
|
+
expect(set.multiplicity(:c)).to eql(1)
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should return the cardinality of the set" do
|
14
14
|
set = Multiset.new([:a, :a, :b, :b, :b, :c])
|
15
|
-
set.cardinality.
|
15
|
+
expect(set.cardinality).to eql(6)
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should be eql" do
|
19
19
|
s1 = Multiset.new([:a, :b])
|
20
20
|
s2 = Multiset.new([:b, :a])
|
21
|
-
s1.
|
21
|
+
expect(s1).to eql(s2)
|
22
22
|
|
23
23
|
s1 = Multiset.new([:a, :a])
|
24
24
|
s2 = Multiset.new([:a])
|
25
|
-
s1.
|
25
|
+
expect(s1).to_not eql(s2)
|
26
26
|
end
|
27
27
|
|
28
28
|
it "should replace the contents of the set" do
|
29
29
|
set = Multiset[:a, :b, :b, :c]
|
30
30
|
ret = set.replace(Multiset[:a, :a, :b, :b, :b, :c])
|
31
31
|
|
32
|
-
set.
|
33
|
-
set.
|
32
|
+
expect(set).to equal(ret)
|
33
|
+
expect(set).to eql(Multiset[:a, :a, :b, :b, :b, :c])
|
34
34
|
|
35
35
|
set = Multiset[:a, :b, :b, :c]
|
36
36
|
ret = set.replace([:a, :a, :b, :b, :b, :c])
|
37
37
|
|
38
|
-
set.
|
39
|
-
set.
|
38
|
+
expect(set).to equal(ret)
|
39
|
+
expect(set).to eql(Multiset[:a, :a, :b, :b, :b, :c])
|
40
40
|
end
|
41
41
|
|
42
42
|
it "should return true if the set is a superset of the given set" do
|
43
43
|
set = Multiset[1, 2, 2, 3]
|
44
44
|
|
45
|
-
set.superset?(Multiset[]).
|
46
|
-
set.superset?(Multiset[1, 2]).
|
47
|
-
set.superset?(Multiset[1, 2, 3]).
|
48
|
-
set.superset?(Multiset[1, 2, 2, 3]).
|
49
|
-
set.superset?(Multiset[1, 2, 2, 2]).
|
50
|
-
set.superset?(Multiset[1, 2, 3, 4]).
|
51
|
-
set.superset?(Multiset[1, 4]).
|
45
|
+
expect(set.superset?(Multiset[])).to be_true
|
46
|
+
expect(set.superset?(Multiset[1, 2])).to be_true
|
47
|
+
expect(set.superset?(Multiset[1, 2, 3])).to be_true
|
48
|
+
expect(set.superset?(Multiset[1, 2, 2, 3])).to be_true
|
49
|
+
expect(set.superset?(Multiset[1, 2, 2, 2])).to be_false
|
50
|
+
expect(set.superset?(Multiset[1, 2, 3, 4])).to be_false
|
51
|
+
expect(set.superset?(Multiset[1, 4])).to be_false
|
52
52
|
end
|
53
53
|
|
54
54
|
it "should return true if the set is a proper superset of the given set" do
|
55
55
|
set = Multiset[1, 2, 2, 3, 3]
|
56
56
|
|
57
|
-
set.proper_superset?(Multiset[]).
|
58
|
-
set.proper_superset?(Multiset[1, 2]).
|
59
|
-
set.proper_superset?(Multiset[1, 2, 3]).
|
60
|
-
set.proper_superset?(Multiset[1, 2, 2, 3, 3]).
|
61
|
-
set.proper_superset?(Multiset[1, 2, 2, 2]).
|
62
|
-
set.proper_superset?(Multiset[1, 2, 3, 4]).
|
63
|
-
set.proper_superset?(Multiset[1, 4]).
|
57
|
+
expect(set.proper_superset?(Multiset[])).to be_true
|
58
|
+
expect(set.proper_superset?(Multiset[1, 2])).to be_true
|
59
|
+
expect(set.proper_superset?(Multiset[1, 2, 3])).to be_true
|
60
|
+
expect(set.proper_superset?(Multiset[1, 2, 2, 3, 3])).to be_false
|
61
|
+
expect(set.proper_superset?(Multiset[1, 2, 2, 2])).to be_false
|
62
|
+
expect(set.proper_superset?(Multiset[1, 2, 3, 4])).to be_false
|
63
|
+
expect(set.proper_superset?(Multiset[1, 4])).to be_false
|
64
64
|
end
|
65
65
|
|
66
66
|
it "should return true if the set is a subset of the given set" do
|
67
67
|
set = Multiset[1, 2, 2, 3]
|
68
68
|
|
69
|
-
set.subset?(Multiset[1, 2, 2, 3, 4]).
|
70
|
-
set.subset?(Multiset[1, 2, 2, 3, 3]).
|
71
|
-
set.subset?(Multiset[1, 2, 2, 3]).
|
72
|
-
set.subset?(Multiset[1, 2, 3]).
|
73
|
-
set.subset?(Multiset[1, 2, 2]).
|
74
|
-
set.subset?(Multiset[1, 2, 3]).
|
75
|
-
set.subset?(Multiset[]).
|
69
|
+
expect(set.subset?(Multiset[1, 2, 2, 3, 4])).to be_true
|
70
|
+
expect(set.subset?(Multiset[1, 2, 2, 3, 3])).to be_true
|
71
|
+
expect(set.subset?(Multiset[1, 2, 2, 3])).to be_true
|
72
|
+
expect(set.subset?(Multiset[1, 2, 3])).to be_false
|
73
|
+
expect(set.subset?(Multiset[1, 2, 2])).to be_false
|
74
|
+
expect(set.subset?(Multiset[1, 2, 3])).to be_false
|
75
|
+
expect(set.subset?(Multiset[])).to be_false
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should return true if the set is a proper subset of the given set" do
|
79
79
|
set = Multiset[1, 2, 2, 3, 3]
|
80
80
|
|
81
|
-
set.proper_subset?(Multiset[1, 2, 2, 3, 3, 4]).
|
82
|
-
set.proper_subset?(Multiset[1, 2, 2, 3, 3]).
|
83
|
-
set.proper_subset?(Multiset[1, 2, 3]).
|
84
|
-
set.proper_subset?(Multiset[1, 2, 2]).
|
85
|
-
set.proper_subset?(Multiset[1, 2, 3]).
|
86
|
-
set.proper_subset?(Multiset[]).
|
81
|
+
expect(set.proper_subset?(Multiset[1, 2, 2, 3, 3, 4])).to be_true
|
82
|
+
expect(set.proper_subset?(Multiset[1, 2, 2, 3, 3])).to be_false
|
83
|
+
expect(set.proper_subset?(Multiset[1, 2, 3])).to be_false
|
84
|
+
expect(set.proper_subset?(Multiset[1, 2, 2])).to be_false
|
85
|
+
expect(set.proper_subset?(Multiset[1, 2, 3])).to be_false
|
86
|
+
expect(set.proper_subset?(Multiset[])).to be_false
|
87
87
|
end
|
88
88
|
|
89
89
|
it "should delete the objects from the set and return self" do
|
90
90
|
set = Multiset[1, 2, 2, 3]
|
91
91
|
|
92
92
|
ret = set.delete(4)
|
93
|
-
set.
|
94
|
-
set.
|
93
|
+
expect(set).to equal(ret)
|
94
|
+
expect(set).to eql(Multiset[1, 2, 2, 3])
|
95
95
|
|
96
96
|
ret = set.delete(2)
|
97
|
-
set.
|
98
|
-
set.
|
97
|
+
expect(set).to eql(ret)
|
98
|
+
expect(set).to eql(Multiset[1, 3])
|
99
99
|
end
|
100
100
|
|
101
101
|
it "should delete the number objects from the set and return self" do
|
102
102
|
set = Multiset[1, 2, 2, 3]
|
103
103
|
|
104
104
|
ret = set.delete(2, 1)
|
105
|
-
set.
|
106
|
-
set.
|
105
|
+
expect(set).to eql(ret)
|
106
|
+
expect(set).to eql(Multiset[1, 2, 3])
|
107
107
|
end
|
108
108
|
|
109
109
|
it "should merge the elements of the given enumerable object to the set and return self" do
|
110
110
|
set = Multiset[1, 2, 3]
|
111
111
|
ret = set.merge([2, 4, 5])
|
112
|
-
set.
|
113
|
-
set.
|
112
|
+
expect(set).to equal(ret)
|
113
|
+
expect(set).to eql(Multiset[1, 2, 2, 3, 4, 5])
|
114
114
|
|
115
115
|
set = Multiset[1, 2, 3]
|
116
116
|
ret = set.merge(Multiset[2, 4, 5])
|
117
|
-
set.
|
118
|
-
set.
|
117
|
+
expect(set).to equal(ret)
|
118
|
+
expect(set).to eql(Multiset[1, 2, 2, 3, 4, 5])
|
119
119
|
end
|
120
120
|
|
121
121
|
it "should delete every element that appears in the given enumerable object and return self" do
|
122
122
|
set = Multiset[1, 2, 2, 3]
|
123
123
|
ret = set.subtract([2, 4, 6])
|
124
|
-
set.
|
125
|
-
set.
|
124
|
+
expect(set).to equal(ret)
|
125
|
+
expect(set).to eql(Multiset[1, 2, 3])
|
126
126
|
end
|
127
127
|
|
128
128
|
it "should return a new set containing elements common to the set and the given enumerable object" do
|
129
129
|
set = Multiset[1, 2, 2, 3, 4]
|
130
130
|
|
131
131
|
ret = set & [2, 2, 4, 5]
|
132
|
-
set.
|
133
|
-
ret.
|
132
|
+
expect(set).to_not equal(ret)
|
133
|
+
expect(ret).to eql(Multiset[2, 2, 4])
|
134
134
|
|
135
135
|
set = Multiset[1, 2, 3]
|
136
136
|
|
137
137
|
ret = set & [1, 2, 2, 2]
|
138
|
-
set.
|
139
|
-
ret.
|
138
|
+
expect(set).to_not equal(ret)
|
139
|
+
expect(ret).to eql(Multiset[1, 2])
|
140
140
|
end
|
141
141
|
|
142
142
|
it "should return a new set containing elements exclusive between the set and the given enumerable object" do
|
143
143
|
set = Multiset[1, 2, 3, 4, 5]
|
144
144
|
ret = set ^ [2, 4, 5, 5]
|
145
|
-
set.
|
146
|
-
ret.
|
145
|
+
expect(set).to_not equal(ret)
|
146
|
+
expect(ret).to eql(Multiset[1, 3, 5])
|
147
147
|
|
148
148
|
set = Multiset[1, 2, 4, 5, 5]
|
149
149
|
ret = set ^ [2, 3, 4, 5]
|
150
|
-
set.
|
151
|
-
ret.
|
150
|
+
expect(set).to_not equal(ret)
|
151
|
+
expect(ret).to eql(Multiset[1, 3, 5])
|
152
152
|
end
|
153
153
|
|
154
154
|
it "should marshal set" do
|
155
155
|
set = Multiset[1, 2, 3, 4, 5]
|
156
156
|
data = Marshal.dump(set)
|
157
|
-
Marshal.load(data).
|
157
|
+
expect(Marshal.load(data)).to eql(set)
|
158
158
|
end
|
159
159
|
|
160
160
|
it "should dump yaml" do
|
@@ -162,7 +162,7 @@ describe Multiset do
|
|
162
162
|
|
163
163
|
set = Multiset[1, 2, 3, 4, 5]
|
164
164
|
data = YAML.dump(set)
|
165
|
-
YAML.load(data).
|
165
|
+
expect(YAML.load(data)).to eql(set)
|
166
166
|
end
|
167
167
|
end
|
168
168
|
|
@@ -174,11 +174,11 @@ describe Multiset, "with inital values" do
|
|
174
174
|
end
|
175
175
|
|
176
176
|
it "should return the multiplicity of the element" do
|
177
|
-
@set.multiplicity(1).
|
178
|
-
@set.multiplicity(2).
|
177
|
+
expect(@set.multiplicity(1)).to eql(1)
|
178
|
+
expect(@set.multiplicity(2)).to eql(1)
|
179
179
|
end
|
180
180
|
|
181
181
|
it "should return the cardinality of the set" do
|
182
|
-
@set.cardinality.
|
182
|
+
expect(@set.cardinality).to eql(2)
|
183
183
|
end
|
184
184
|
end
|
@@ -10,54 +10,54 @@ describe NestedMultimap, "with inital values" do
|
|
10
10
|
|
11
11
|
it "should set value at nested key" do
|
12
12
|
@map["foo", "bar", "baz"] = 100
|
13
|
-
@map["foo", "bar", "baz"].
|
13
|
+
expect(@map["foo", "bar", "baz"]).to eql([100])
|
14
14
|
end
|
15
15
|
|
16
16
|
it "should allow nil keys to be set" do
|
17
17
|
@map["b", nil] = 400
|
18
18
|
@map["b", "c"] = 500
|
19
19
|
|
20
|
-
@map["a"].
|
21
|
-
@map["b"].
|
22
|
-
@map["b", nil].
|
23
|
-
@map["b", "c"].
|
20
|
+
expect(@map["a"]).to eql([100])
|
21
|
+
expect(@map["b"]).to eql([200, 300])
|
22
|
+
expect(@map["b", nil]).to eql([200, 300, 400])
|
23
|
+
expect(@map["b", "c"]).to eql([200, 300, 500])
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should treat missing keys as append to all" do
|
27
27
|
@map[] = 400
|
28
|
-
@map["a"].
|
29
|
-
@map["b"].
|
30
|
-
@map["c"].
|
31
|
-
@map[nil].
|
28
|
+
expect(@map["a"]).to eql([100, 400])
|
29
|
+
expect(@map["b"]).to eql([200, 300, 400])
|
30
|
+
expect(@map["c"]).to eql([400])
|
31
|
+
expect(@map[nil]).to eql([400])
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should append the value to default containers" do
|
35
35
|
@map << 400
|
36
|
-
@map["a"].
|
37
|
-
@map["b"].
|
38
|
-
@map["c"].
|
39
|
-
@map[nil].
|
36
|
+
expect(@map["a"]).to eql([100, 400])
|
37
|
+
expect(@map["b"]).to eql([200, 300, 400])
|
38
|
+
expect(@map["c"]).to eql([400])
|
39
|
+
expect(@map[nil]).to eql([400])
|
40
40
|
end
|
41
41
|
|
42
42
|
it "should append the value to all containers" do
|
43
43
|
@map << 500
|
44
|
-
@map["a"].
|
45
|
-
@map["b"].
|
46
|
-
@map[nil].
|
44
|
+
expect(@map["a"]).to eql([100, 500])
|
45
|
+
expect(@map["b"]).to eql([200, 300, 500])
|
46
|
+
expect(@map[nil]).to eql([500])
|
47
47
|
end
|
48
48
|
|
49
49
|
it "default values should be copied to new containers" do
|
50
50
|
@map << 300
|
51
51
|
@map["x"] = 100
|
52
|
-
@map["x"].
|
52
|
+
expect(@map["x"]).to eql([300, 100])
|
53
53
|
end
|
54
54
|
|
55
55
|
it "should list all containers" do
|
56
|
-
@map.containers.
|
56
|
+
expect(@map.containers).to sorted_eql([[100], [200, 300]])
|
57
57
|
end
|
58
58
|
|
59
59
|
it "should list all values" do
|
60
|
-
@map.values.
|
60
|
+
expect(@map.values).to sorted_eql([100, 200, 300])
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -72,52 +72,52 @@ describe NestedMultimap, "with nested values" do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
it "should retrieve container of values for key" do
|
75
|
-
@map["a"].
|
76
|
-
@map["b"].
|
77
|
-
@map["c"].
|
78
|
-
@map["a", "b"].
|
79
|
-
@map["b", "c"].
|
80
|
-
@map["c", "e"].
|
75
|
+
expect(@map["a"]).to eql([100])
|
76
|
+
expect(@map["b"]).to eql([200])
|
77
|
+
expect(@map["c"]).to eql([500])
|
78
|
+
expect(@map["a", "b"]).to eql([100])
|
79
|
+
expect(@map["b", "c"]).to eql([200, 300])
|
80
|
+
expect(@map["c", "e"]).to eql([400, 500])
|
81
81
|
end
|
82
82
|
|
83
83
|
it "should append the value to default containers" do
|
84
84
|
@map << 600
|
85
|
-
@map["a"].
|
86
|
-
@map["b"].
|
87
|
-
@map["c"].
|
88
|
-
@map["a", "b"].
|
89
|
-
@map["b", "c"].
|
90
|
-
@map["c", "e"].
|
91
|
-
@map[nil].
|
85
|
+
expect(@map["a"]).to eql([100, 600])
|
86
|
+
expect(@map["b"]).to eql([200, 600])
|
87
|
+
expect(@map["c"]).to eql([500, 600])
|
88
|
+
expect(@map["a", "b"]).to eql([100, 600])
|
89
|
+
expect(@map["b", "c"]).to eql([200, 300, 600])
|
90
|
+
expect(@map["c", "e"]).to eql([400, 500, 600])
|
91
|
+
expect(@map[nil]).to eql([600])
|
92
92
|
end
|
93
93
|
|
94
94
|
it "should duplicate the containers" do
|
95
95
|
map2 = @map.dup
|
96
|
-
map2.
|
97
|
-
map2.
|
96
|
+
expect(map2).to_not equal(@map)
|
97
|
+
expect(map2).to eql(@map)
|
98
98
|
|
99
|
-
map2["a"].
|
100
|
-
map2["b"].
|
101
|
-
map2["c"].
|
102
|
-
map2["a", "b"].
|
103
|
-
map2["b", "c"].
|
104
|
-
map2["c", "e"].
|
99
|
+
expect(map2["a"]).to eql([100])
|
100
|
+
expect(map2["b"]).to eql([200])
|
101
|
+
expect(map2["c"]).to eql([500])
|
102
|
+
expect(map2["a", "b"]).to eql([100])
|
103
|
+
expect(map2["b", "c"]).to eql([200, 300])
|
104
|
+
expect(map2["c", "e"]).to eql([400, 500])
|
105
105
|
|
106
|
-
map2["a"].
|
107
|
-
map2["b"].
|
108
|
-
map2["c"].
|
109
|
-
map2["a", "b"].
|
110
|
-
map2["b", "c"].
|
111
|
-
map2["c", "e"].
|
106
|
+
expect(map2["a"]).to_not equal(@map["a"])
|
107
|
+
expect(map2["b"]).to_not equal(@map["b"])
|
108
|
+
expect(map2["c"]).to_not equal(@map["c"])
|
109
|
+
expect(map2["a", "b"]).to_not equal(@map["a", "b"])
|
110
|
+
expect(map2["b", "c"]).to_not equal(@map["b", "c"])
|
111
|
+
expect(map2["c", "e"]).to_not equal(@map["c", "e"])
|
112
112
|
|
113
|
-
map2.default.
|
114
|
-
map2.default.
|
113
|
+
expect(map2.default).to_not equal(@map.default)
|
114
|
+
expect(map2.default).to eql(@map.default)
|
115
115
|
end
|
116
116
|
|
117
117
|
it "should iterate over each key/value pair and yield an array" do
|
118
118
|
a = []
|
119
119
|
@map.each { |pair| a << pair }
|
120
|
-
a.
|
120
|
+
expect(a).to sorted_eql([
|
121
121
|
["a", 100],
|
122
122
|
[["b", "c"], 200],
|
123
123
|
[["b", "c"], 300],
|
@@ -129,7 +129,7 @@ describe NestedMultimap, "with nested values" do
|
|
129
129
|
it "should iterate over each key/container" do
|
130
130
|
a = []
|
131
131
|
@map.each_association { |key, container| a << [key, container] }
|
132
|
-
a.
|
132
|
+
expect(a).to sorted_eql([
|
133
133
|
["a", [100]],
|
134
134
|
[["b", "c"], [200, 300]],
|
135
135
|
[["c", "e"], [400, 500]]
|
@@ -139,7 +139,7 @@ describe NestedMultimap, "with nested values" do
|
|
139
139
|
it "should iterate over each container plus the default" do
|
140
140
|
a = []
|
141
141
|
@map.each_container_with_default { |container| a << container }
|
142
|
-
a.
|
142
|
+
expect(a).to sorted_eql([
|
143
143
|
[100],
|
144
144
|
[200, 300],
|
145
145
|
[200],
|
@@ -152,13 +152,13 @@ describe NestedMultimap, "with nested values" do
|
|
152
152
|
it "should iterate over each key" do
|
153
153
|
a = []
|
154
154
|
@map.each_key { |key| a << key }
|
155
|
-
a.
|
155
|
+
expect(a).to sorted_eql(["a", ["b", "c"], ["b", "c"], ["c", "e"], ["c", "e"]])
|
156
156
|
end
|
157
157
|
|
158
158
|
it "should iterate over each key/value pair and yield the pair" do
|
159
159
|
h = {}
|
160
160
|
@map.each_pair { |key, value| (h[key] ||= []) << value }
|
161
|
-
h.
|
161
|
+
expect(h).to eql({
|
162
162
|
"a" => [100],
|
163
163
|
["c", "e"] => [400, 500],
|
164
164
|
["b", "c"] => [200, 300]
|
@@ -168,23 +168,23 @@ describe NestedMultimap, "with nested values" do
|
|
168
168
|
it "should iterate over each value" do
|
169
169
|
a = []
|
170
170
|
@map.each_value { |value| a << value }
|
171
|
-
a.
|
171
|
+
expect(a).to sorted_eql([100, 200, 300, 400, 500])
|
172
172
|
end
|
173
173
|
|
174
174
|
it "should list all containers" do
|
175
|
-
@map.containers.
|
175
|
+
expect(@map.containers).to sorted_eql([[100], [200, 300], [400, 500]])
|
176
176
|
end
|
177
177
|
|
178
178
|
it "should list all containers plus the default" do
|
179
|
-
@map.containers_with_default.
|
179
|
+
expect(@map.containers_with_default).to sorted_eql([[100], [200, 300], [200], [400, 500], [500], []])
|
180
180
|
end
|
181
181
|
|
182
182
|
it "should return array of keys" do
|
183
|
-
@map.keys.
|
183
|
+
expect(@map.keys).to eql(["a", ["b", "c"], ["b", "c"], ["c", "e"], ["c", "e"]])
|
184
184
|
end
|
185
185
|
|
186
186
|
it "should list all values" do
|
187
|
-
@map.values.
|
187
|
+
expect(@map.values).to sorted_eql([100, 200, 300, 400, 500])
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|