Skip to content

Commit 9a504bc

Browse files
committed
add spec to cover pending only output
1 parent 479de00 commit 9a504bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/rspec/core/formatters/base_text_formatter_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
expect(formatter_output.string).to match("1 example, 1 failure, 1 pending")
3636
end
3737

38+
it "with 1s outputs singular (only pending)" do
39+
send_notification :dump_summary, summary_notification(1, examples(1), examples(0), examples(1), 0)
40+
expect(formatter_output.string).to match("1 example, 0 failures, 1 pending")
41+
end
42+
3843
it "with 2s outputs pluralized (including pending)" do
3944
send_notification :dump_summary, summary_notification(2, examples(2), examples(2), examples(2), 0)
4045
expect(formatter_output.string).to match("2 examples, 2 failures, 2 pending")

0 commit comments

Comments
 (0)