Skip to content

Commit

Permalink
Revert change to generated description
Browse files Browse the repository at this point in the history
This reverts commit 600c6c1.
  • Loading branch information
JonRowe committed Mar 4, 2019
1 parent 99e1bcf commit ba6590a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions features/command_line/line_number_appended_to_path.feature
Expand Up @@ -155,5 +155,5 @@ Feature: line number appended to file path
Scenario: Matching one-liners
When I run `rspec one_liner_spec.rb:3 --format doc`
Then the examples should all pass
Then the output should contain "is expected to be > 8"
But the output should not contain "is expected to be < 10"
Then the output should contain "should be > 8"
But the output should not contain "should be < 10"
8 changes: 4 additions & 4 deletions features/subject/one_liner_syntax.feature
Expand Up @@ -46,8 +46,8 @@ Feature: One-liner syntax
"""
Array
when first created
is expected to be empty
is expected to be empty
should be empty
should be empty
"""

Scenario: Explicit subject
Expand All @@ -68,6 +68,6 @@ Feature: One-liner syntax
"""
Array
with 3 items
is expected not to be empty
is expected not to be empty
should not be empty
should not be empty
"""
12 changes: 6 additions & 6 deletions spec/rspec/core/example_spec.rb
Expand Up @@ -187,13 +187,13 @@ def assert(val)
it "uses the matcher-generated description" do
example_group.example { expect(5).to eq(5) }
example_group.run
expect(example_group.examples.first.description).to eq("is expected to eq 5")
expect(example_group.examples.first.description).to eq("should eq 5")
end

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

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

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

expect(ex.description).to eq("is expected to eq 2")
expect(ex.description).to eq("should eq 2")
end
end

Expand Down Expand Up @@ -268,7 +268,7 @@ def assert(val)
after { expect(true).to eq(true) }
end.run

expect(ex).to pass.and have_attributes(:description => "is expected to be nil")
expect(ex).to pass.and have_attributes(:description => "should be nil")
end
end
end
Expand All @@ -279,7 +279,7 @@ def assert(val)
it "uses the matcher-generated description" do
example_group.example { expect(5).to eq(5) }
example_group.run
expect(example_group.examples.first.description).to eq("is expected to eq 5")
expect(example_group.examples.first.description).to eq("should eq 5")
end

it "uses the file and line number if there is no matcher-generated description" do
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core/pending_example_spec.rb
Expand Up @@ -150,7 +150,7 @@
end
end.run

expect(ex.description).to eq('is expected to eq "gnirts"')
expect(ex.description).to eq('should eq "gnirts"')
end
end

Expand Down

0 comments on commit ba6590a

Please sign in to comment.