Skip to content

Commit e162e4c

Browse files
committed
Use _() instead of value() for minitest expectations
The former is just a shortened (and preferred) alias of the latter.
1 parent c81eee1 commit e162e4c

9 files changed

+140
-140
lines changed

test/object_inspector/conversions_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class ObjectInspector::ConversionsTest < Minitest::Spec
1313

1414
context "GIVEN an ObjectInspector::Scope" do
1515
it "returns the same ObjectInspector::Scope" do
16-
value(klazz.Scope(scope1).object_id).must_equal(scope1.object_id)
16+
_(klazz.Scope(scope1).object_id).must_equal(scope1.object_id)
1717
end
1818
end
1919

2020
context "GIVEN a Symbol" do
2121
it "returns a new Scope for the given Symbol" do
2222
new_scope = klazz.Scope(:verbose)
23-
value(new_scope.names).must_include("verbose")
23+
_(new_scope.names).must_include("verbose")
2424
end
2525
end
2626
end

test/object_inspector/formatters/base_formatter_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ObjectInspector::BaseFormatterTest < Minitest::Spec
88

99
describe "#call" do
1010
it "raises NotImplementedError" do
11-
value(-> { klazz.new(Object.new).call }).must_raise(
11+
_(-> { klazz.new(Object.new).call }).must_raise(
1212
NotImplementedError)
1313
end
1414
end

test/object_inspector/formatters/combining_formatter_test.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
6767
subject { klazz.new(inspector_with_wrapped_object) }
6868

6969
it "returns the expected String" do
70-
value(subject.call).must_equal(
70+
_(subject.call).must_equal(
7171
"<WRAPPER> "\
7272
"#{ObjectInspector.configuration.presented_object_separator} "\
7373
"<SIMPLE_TEST_OBJECT>")
@@ -78,7 +78,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
7878
subject { klazz.new(inspector_with_flags_and_info_and_name) }
7979

8080
it "returns the expected String" do
81-
value(subject.call).must_equal(
81+
_(subject.call).must_equal(
8282
"<IDENTIFICATION(FLAG1 | FLAG2) INFO :: NAME>")
8383
end
8484
end
@@ -87,7 +87,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
8787
subject { klazz.new(inspector_with_flags_and_info) }
8888

8989
it "returns the expected String" do
90-
value(subject.call).must_equal(
90+
_(subject.call).must_equal(
9191
"<IDENTIFICATION(FLAG1 | FLAG2) INFO>")
9292
end
9393
end
@@ -96,7 +96,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
9696
subject { klazz.new(inspector_with_flags_and_name) }
9797

9898
it "returns the expected String" do
99-
value(subject.call).must_equal(
99+
_(subject.call).must_equal(
100100
"<IDENTIFICATION(FLAG1 | FLAG2) :: NAME>")
101101
end
102102
end
@@ -105,39 +105,39 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
105105
subject { klazz.new(inspector_with_info_and_name) }
106106

107107
it "returns the expected String" do
108-
value(subject.call).must_equal("<IDENTIFICATION INFO :: NAME>")
108+
_(subject.call).must_equal("<IDENTIFICATION INFO :: NAME>")
109109
end
110110
end
111111

112112
context "GIVEN an Inspector with #name" do
113113
subject { klazz.new(inspector_with_name) }
114114

115115
it "returns the expected String" do
116-
value(subject.call).must_equal("<IDENTIFICATION :: NAME>")
116+
_(subject.call).must_equal("<IDENTIFICATION :: NAME>")
117117
end
118118
end
119119

120120
context "GIVEN an Inspector with #flags" do
121121
subject { klazz.new(inspector_with_flags) }
122122

123123
it "returns the expected String" do
124-
value(subject.call).must_equal("<IDENTIFICATION(FLAG1 | FLAG2)>")
124+
_(subject.call).must_equal("<IDENTIFICATION(FLAG1 | FLAG2)>")
125125
end
126126
end
127127

128128
context "GIVEN an Inspector with #info" do
129129
subject { klazz.new(inspector_with_info) }
130130

131131
it "returns the expected String" do
132-
value(subject.call).must_equal("<IDENTIFICATION INFO>")
132+
_(subject.call).must_equal("<IDENTIFICATION INFO>")
133133
end
134134
end
135135

136136
context "GIVEN an Inspector with #base" do
137137
subject { klazz.new(inspector_with_base) }
138138

139139
it "returns the expected String" do
140-
value(subject.call).must_equal("<IDENTIFICATION>")
140+
_(subject.call).must_equal("<IDENTIFICATION>")
141141
end
142142
end
143143
end

test/object_inspector/formatters/templating_formatter_test.rb

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
120120
subject { klazz.new(inspector_with_wrapped_object) }
121121

122122
it "returns the expected String" do
123-
value(subject.call).must_equal(
123+
_(subject.call).must_equal(
124124
"<WRAPPER> "\
125125
"#{ObjectInspector.configuration.presented_object_separator} "\
126126
"<SIMPLE_TEST_OBJECT>")
@@ -131,7 +131,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
131131
subject { klazz.new(inspector_with_flags_and_issues_and_info_and_name) }
132132

133133
it "returns the expected String" do
134-
value(subject.call).must_equal(
134+
_(subject.call).must_equal(
135135
"<IDENTIFICATION(FLAG1 | FLAG2) !!ISSUE1 | ISSUE2!! INFO :: NAME>")
136136
end
137137
end
@@ -140,7 +140,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
140140
subject { klazz.new(inspector_with_flags_and_issues_and_info) }
141141

142142
it "returns the expected String" do
143-
value(subject.call).must_equal(
143+
_(subject.call).must_equal(
144144
"<IDENTIFICATION(FLAG1 | FLAG2) !!ISSUE1 | ISSUE2!! INFO>")
145145
end
146146
end
@@ -149,7 +149,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
149149
subject { klazz.new(inspector_with_flags_and_issues_and_name) }
150150

151151
it "returns the expected String" do
152-
value(subject.call).must_equal(
152+
_(subject.call).must_equal(
153153
"<IDENTIFICATION(FLAG1 | FLAG2) !!ISSUE1 | ISSUE2!! :: NAME>")
154154
end
155155
end
@@ -158,7 +158,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
158158
subject { klazz.new(inspector_with_flags_and_info_and_name) }
159159

160160
it "returns the expected String" do
161-
value(subject.call).must_equal(
161+
_(subject.call).must_equal(
162162
"<IDENTIFICATION(FLAG1 | FLAG2) INFO :: NAME>")
163163
end
164164
end
@@ -167,7 +167,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
167167
subject { klazz.new(inspector_with_issues_and_info_and_name) }
168168

169169
it "returns the expected String" do
170-
value(subject.call).must_equal(
170+
_(subject.call).must_equal(
171171
"<IDENTIFICATION !!ISSUE1 | ISSUE2!! INFO :: NAME>")
172172
end
173173
end
@@ -176,7 +176,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
176176
subject { klazz.new(inspector_with_flags_and_issues) }
177177

178178
it "returns the expected String" do
179-
value(subject.call).must_equal(
179+
_(subject.call).must_equal(
180180
"<IDENTIFICATION(FLAG1 | FLAG2) !!ISSUE1 | ISSUE2!!>")
181181
end
182182
end
@@ -185,7 +185,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
185185
subject { klazz.new(inspector_with_flags_and_info) }
186186

187187
it "returns the expected String" do
188-
value(subject.call).must_equal(
188+
_(subject.call).must_equal(
189189
"<IDENTIFICATION(FLAG1 | FLAG2) INFO>")
190190
end
191191
end
@@ -194,7 +194,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
194194
subject { klazz.new(inspector_with_flags_and_name) }
195195

196196
it "returns the expected String" do
197-
value(subject.call).must_equal(
197+
_(subject.call).must_equal(
198198
"<IDENTIFICATION(FLAG1 | FLAG2) :: NAME>")
199199
end
200200
end
@@ -203,15 +203,15 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
203203
subject { klazz.new(inspector_with_info_and_name) }
204204

205205
it "returns the expected String" do
206-
value(subject.call).must_equal("<IDENTIFICATION INFO :: NAME>")
206+
_(subject.call).must_equal("<IDENTIFICATION INFO :: NAME>")
207207
end
208208
end
209209

210210
context "GIVEN an Inspector with #issues and #info" do
211211
subject { klazz.new(inspector_with_issues_and_info) }
212212

213213
it "returns the expected String" do
214-
value(subject.call).must_equal(
214+
_(subject.call).must_equal(
215215
"<IDENTIFICATION !!ISSUE1 | ISSUE2!! INFO>")
216216
end
217217
end
@@ -220,7 +220,7 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
220220
subject { klazz.new(inspector_with_issues_and_name) }
221221

222222
it "returns the expected String" do
223-
value(subject.call).must_equal(
223+
_(subject.call).must_equal(
224224
"<IDENTIFICATION !!ISSUE1 | ISSUE2!! :: NAME>")
225225
end
226226
end
@@ -229,23 +229,23 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
229229
subject { klazz.new(inspector_with_name) }
230230

231231
it "returns the expected String" do
232-
value(subject.call).must_equal("<IDENTIFICATION :: NAME>")
232+
_(subject.call).must_equal("<IDENTIFICATION :: NAME>")
233233
end
234234
end
235235

236236
context "GIVEN an Inspector with #flags" do
237237
subject { klazz.new(inspector_with_flags) }
238238

239239
it "returns the expected String" do
240-
value(subject.call).must_equal("<IDENTIFICATION(FLAG1 | FLAG2)>")
240+
_(subject.call).must_equal("<IDENTIFICATION(FLAG1 | FLAG2)>")
241241
end
242242
end
243243

244244
context "GIVEN an Inspector with #issues" do
245245
subject { klazz.new(inspector_with_issues) }
246246

247247
it "returns the expected String" do
248-
value(subject.call).must_equal(
248+
_(subject.call).must_equal(
249249
"<IDENTIFICATION !!ISSUE1 | ISSUE2!!>")
250250
end
251251
end
@@ -254,15 +254,15 @@ def inspect_identification; "SIMPLE_TEST_OBJECT" end
254254
subject { klazz.new(inspector_with_info) }
255255

256256
it "returns the expected String" do
257-
value(subject.call).must_equal("<IDENTIFICATION INFO>")
257+
_(subject.call).must_equal("<IDENTIFICATION INFO>")
258258
end
259259
end
260260

261261
context "GIVEN an Inspector with #base" do
262262
subject { klazz.new(inspector_with_base) }
263263

264264
it "returns the expected String" do
265-
value(subject.call).must_equal("<IDENTIFICATION>")
265+
_(subject.call).must_equal("<IDENTIFICATION>")
266266
end
267267
end
268268
end

0 commit comments

Comments
 (0)