diff options
| author | Mike McQuaid | 2017-07-13 21:07:36 +0100 |
|---|---|---|
| committer | GitHub | 2017-07-13 21:07:36 +0100 |
| commit | 7d443e6bfed0e6635da7224a0c0bbd2d4c5d80f9 (patch) | |
| tree | f4192a04936def4313da661edac76fd8926431f1 | |
| parent | f7c254dc33daa30664cb93c5427b43e89eeec2ab (diff) | |
| parent | 8b63214c2e7493903f40511a59aba4dd60419349 (diff) | |
| download | brew-7d443e6bfed0e6635da7224a0c0bbd2d4c5d80f9.tar.bz2 | |
Merge pull request #2894 from MikeMcQuaid/integration-test-debugging
integration_test: try tests on Gem load failure.
| -rw-r--r-- | Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index 94a47acc5..cf9c13fb8 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -89,8 +89,14 @@ RSpec.shared_context "integration test" do ] if ENV["HOMEBREW_TESTS_COVERAGE"] simplecov_spec = Gem.loaded_specs["simplecov"] - specs = simplecov_spec.runtime_dependencies.flat_map(&:to_specs) - specs << simplecov_spec + specs = [simplecov_spec] + simplecov_spec.runtime_dependencies.each do |dep| + begin + specs += dep.to_specs + rescue Gem::LoadError => e + onoe e + end + end libs = specs.flat_map do |spec| full_gem_path = spec.full_gem_path # full_require_paths isn't available in RubyGems < 2.2. |
