diff --git a/Library/Homebrew/test/cmd/search_spec.rb b/Library/Homebrew/test/cmd/search_spec.rb index 97c4460635..1985362ce8 100644 --- a/Library/Homebrew/test/cmd/search_spec.rb +++ b/Library/Homebrew/test/cmd/search_spec.rb @@ -25,7 +25,7 @@ describe "brew search", :integration_test do .and be_a_success end - it "falls back to a GitHub tap search when no formula is found", :needs_network, retry: 3 do + it "falls back to a GitHub tap search when no formula is found", :needs_network do setup_remote_tap "homebrew/cask" expect { brew "search", "homebrew/cask/firefox" } diff --git a/Library/Homebrew/test/cmd/services_spec.rb b/Library/Homebrew/test/cmd/services_spec.rb index fb40ce0b21..669e84e5f8 100644 --- a/Library/Homebrew/test/cmd/services_spec.rb +++ b/Library/Homebrew/test/cmd/services_spec.rb @@ -1,4 +1,4 @@ -describe "brew services", :integration_test, :needs_macos, :needs_network, retry: 3 do +describe "brew services", :integration_test, :needs_macos, :needs_network do it "allows controlling services" do setup_remote_tap "homebrew/services" diff --git a/Library/Homebrew/test/dev-cmd/pull_spec.rb b/Library/Homebrew/test/dev-cmd/pull_spec.rb index 699eba1078..d07bf57bb4 100644 --- a/Library/Homebrew/test/dev-cmd/pull_spec.rb +++ b/Library/Homebrew/test/dev-cmd/pull_spec.rb @@ -1,5 +1,5 @@ describe "brew pull", :integration_test do - it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network, retry: 3 do + it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network do CoreTap.instance.path.cd do system "git", "init" system "git", "checkout", "-b", "new-branch" diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 1b2c833bce..20bdf95983 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -84,6 +84,10 @@ RSpec.configure do |config| skip "Requires network connection." unless ENV["HOMEBREW_TEST_ONLINE"] end + config.around(:each, :needs_network) do |example| + example.run_with_retry retry: 3, retry_wait: 1 + end + config.before(:each, :needs_svn) do skip "subversion not installed." unless which "svn" end