Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit e5e4ad7

Browse files
johnsywebJonRowe
authored andcommitted
Replace "should" with "is expected to" in generated description (#2572)
1 parent 9d1d0d6 commit e5e4ad7

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

features/command_line/line_number_appended_to_path.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,5 @@ Feature: line number appended to file path
155155
Scenario: Matching one-liners
156156
When I run `rspec one_liner_spec.rb:3 --format doc`
157157
Then the examples should all pass
158-
Then the output should contain "should be > 8"
159-
But the output should not contain "should be < 10"
158+
Then the output should contain "is expected to be > 8"
159+
But the output should not contain "is expected to be < 10"

features/subject/one_liner_syntax.feature

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Feature: One-liner syntax
4646
"""
4747
Array
4848
when first created
49-
should be empty
50-
should be empty
49+
is expected to be empty
50+
is expected to be empty
5151
"""
5252

5353
Scenario: Explicit subject
@@ -68,6 +68,6 @@ Feature: One-liner syntax
6868
"""
6969
Array
7070
with 3 items
71-
should not be empty
72-
should not be empty
71+
is expected not to be empty
72+
is expected not to be empty
7373
"""

spec/rspec/core/example_spec.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ def assert(val)
187187
it "uses the matcher-generated description" do
188188
example_group.example { expect(5).to eq(5) }
189189
example_group.run
190-
expect(example_group.examples.first.description).to eq("should eq 5")
190+
expect(example_group.examples.first.description).to eq("is expected to eq 5")
191191
end
192192

193193
it "uses the matcher-generated description in the full description" do
194194
example_group.example { expect(5).to eq(5) }
195195
example_group.run
196-
expect(example_group.examples.first.full_description).to eq("group description should eq 5")
196+
expect(example_group.examples.first.full_description).to eq("group description is expected to eq 5")
197197
end
198198

199199
it "uses the file and line number if there is no matcher-generated description" do
@@ -213,7 +213,7 @@ def assert(val)
213213
it "still uses the matcher-generated description if a matcher ran" do
214214
example = example_group.example { pending; expect(4).to eq(5) }
215215
example_group.run
216-
expect(example.description).to eq("should eq 5")
216+
expect(example.description).to eq("is expected to eq 5")
217217
end
218218

219219
it "uses the file and line number of the example if no matcher ran" do
@@ -232,7 +232,7 @@ def assert(val)
232232
after { raise "boom" }
233233
end.run
234234

235-
expect(ex.description).to eq("should eq 2")
235+
expect(ex.description).to eq("is expected to eq 2")
236236
end
237237
end
238238

@@ -268,7 +268,7 @@ def assert(val)
268268
after { expect(true).to eq(true) }
269269
end.run
270270

271-
expect(ex).to pass.and have_attributes(:description => "should be nil")
271+
expect(ex).to pass.and have_attributes(:description => "is expected to be nil")
272272
end
273273
end
274274
end
@@ -279,7 +279,7 @@ def assert(val)
279279
it "uses the matcher-generated description" do
280280
example_group.example { expect(5).to eq(5) }
281281
example_group.run
282-
expect(example_group.examples.first.description).to eq("should eq 5")
282+
expect(example_group.examples.first.description).to eq("is expected to eq 5")
283283
end
284284

285285
it "uses the file and line number if there is no matcher-generated description" do

spec/rspec/core/pending_example_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
end
151151
end.run
152152

153-
expect(ex.description).to eq('should eq "gnirts"')
153+
expect(ex.description).to eq('is expected to eq "gnirts"')
154154
end
155155
end
156156

0 commit comments

Comments
 (0)