diff --git a/README.md b/README.md index d2b905c8108f9..6ebfda3fbf20f 100644 --- a/README.md +++ b/README.md @@ -370,7 +370,6 @@ Supported browsers: * `safari-preview` In addition to the [Common Options Examples](#common-options-examples), here are some additional Ruby specific ones: -* `--test_arg "-tfocus"` - test only [focused specs](https://relishapp.com/rspec/rspec-core/v/3-12/docs/filtering/inclusion-filters) * `--test_arg "-eTimeouts"` - test only specs which name include "Timeouts" * `--test_arg ""` - pass any extra RSpec arguments (see `bazel run @bundle//bin:rspec -- --help`) diff --git a/rb/spec/integration/selenium/webdriver/spec_helper.rb b/rb/spec/integration/selenium/webdriver/spec_helper.rb index 013bd8c65c791..bf0a507577ef1 100644 --- a/rb/spec/integration/selenium/webdriver/spec_helper.rb +++ b/rb/spec/integration/selenium/webdriver/spec_helper.rb @@ -45,7 +45,9 @@ GlobalTestEnv.quit_driver end - c.filter_run focus: true if ENV['focus'] + c.filter_run_when_matching :focus + c.run_all_when_everything_filtered = true + c.default_formatter = c.files_to_run.count > 1 ? 'progress' : 'doc' c.before do |example| guards = WebDriver::Support::Guards.new(example, bug_tracker: 'https://github.com/SeleniumHQ/selenium/issues') diff --git a/rb/spec/unit/selenium/webdriver/spec_helper.rb b/rb/spec/unit/selenium/webdriver/spec_helper.rb index 94badd92264e5..cb6cf23d9b00d 100644 --- a/rb/spec/unit/selenium/webdriver/spec_helper.rb +++ b/rb/spec/unit/selenium/webdriver/spec_helper.rb @@ -58,7 +58,9 @@ def with_env(hash) c.include Selenium::WebDriver::UnitSpecHelper - c.filter_run focus: true if ENV['focus'] + c.filter_run_when_matching :focus + c.run_all_when_everything_filtered = true + c.default_formatter = c.files_to_run.count > 1 ? 'progress' : 'doc' c.before do # https://github.com/ruby/debug/issues/797