From f126f0d39b13c7ce3a33d22a0800730dadd16286 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 25 Jan 2023 10:07:42 -0800 Subject: [PATCH] Refactor away rspec/wait --- Library/Homebrew/Gemfile | 1 - Library/Homebrew/Gemfile.lock | 3 --- Library/Homebrew/test/spec_helper.rb | 1 - Library/Homebrew/test/system_command_spec.rb | 6 ++---- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index 2f231e18a7..5a9525327b 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -25,7 +25,6 @@ gem "rspec-its", require: false gem "rspec_junit_formatter", require: false gem "rspec-retry", require: false gem "rspec-sorbet", require: false -gem "rspec-wait", require: false gem "rubocop", require: false gem "rubocop-ast", require: false gem "simplecov", require: false diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 64b6e1efbb..76a16ba985 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -128,8 +128,6 @@ GEM rspec-sorbet (1.9.1) sorbet-runtime rspec-support (3.12.0) - rspec-wait (0.0.9) - rspec (>= 3, < 4) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (1.44.0) @@ -248,7 +246,6 @@ DEPENDENCIES rspec-its rspec-retry rspec-sorbet - rspec-wait rspec_junit_formatter rubocop rubocop-ast diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index a9f9e5a22e..178d860d0a 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -27,7 +27,6 @@ end require "rspec/its" require "rspec/github" -require "rspec/wait" require "rspec/retry" require "rspec/sorbet" require "rubocop/rspec/support" diff --git a/Library/Homebrew/test/system_command_spec.rb b/Library/Homebrew/test/system_command_spec.rb index 6b5e5c219f..8f7dba1561 100644 --- a/Library/Homebrew/test/system_command_spec.rb +++ b/Library/Homebrew/test/system_command_spec.rb @@ -196,10 +196,8 @@ describe SystemCommand do ] } } - it "returns without deadlocking" do - wait(30).for { - described_class.run(command, **options) - }.to be_a_success + it "returns without deadlocking", timeout: 30 do + expect(described_class.run(command, **options)).to be_a_success end end