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

Commit 447893d

Browse files
committed
Fix run all when filtered examples
1 parent 2279229 commit 447893d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

features/configuration/run_all_when_everything_filtered.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Feature: Using `run_all_when_everything_filtered`
6262
"""
6363
When I run `rspec spec/example_spec.rb --tag some_tag`
6464
Then the output should contain "1 example, 0 failures"
65-
And the output should contain "Run options: include {:some_tag=>true}"
65+
And the output should contain in either hash syntax "Run options: include {:some_tag=>true}"
6666

6767
Scenario: When the `run_all_when_everything_filtered` option is turned on, all the specs are run when the tag has no matches
6868
Given a file named "spec/example_spec.rb" with:
@@ -78,5 +78,5 @@ Feature: Using `run_all_when_everything_filtered`
7878
"""
7979
When I run `rspec spec/example_spec.rb --tag some_tag`
8080
Then the output should contain "2 examples, 0 failures"
81-
And the output should contain "All examples were filtered out; ignoring {:some_tag=>true}"
81+
And the output should contain in either hash syntax "All examples were filtered out; ignoring {:some_tag=>true}"
8282

features/step_definitions/additional_cli_steps.rb

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
end
1212
end
1313

14+
Then /^the output should contain in either hash syntax "(.*)"$/ do |string|
15+
if RUBY_VERSION.to_f > 3.3
16+
step "the output should contain \"#{string.gsub(/:(\w+)=>/, '\1: ')}\""
17+
else
18+
step "the output should contain \"#{string}\""
19+
end
20+
end
21+
1422
Then /^the output should contain all of these:$/ do |table|
1523
table.raw.flatten.each do |string|
1624
expect(all_output).to include(string)

0 commit comments

Comments
 (0)