From 197f46e7d670f3cf2a84f2293498e617b486d31f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 5 Mar 2020 22:38:30 +0100 Subject: Simplify `bundle viz` specs Only install the ruby-graphviz for the workers that will run the specific viz specs. --- spec/commands/viz_spec.rb | 7 +++---- spec/other/major_deprecation_spec.rb | 5 ++--- spec/support/rubygems_ext.rb | 3 --- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/spec/commands/viz_spec.rb b/spec/commands/viz_spec.rb index 029c3aca24..e21d52feed 100644 --- a/spec/commands/viz_spec.rb +++ b/spec/commands/viz_spec.rb @@ -2,12 +2,11 @@ RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do let(:ruby_graphviz) do - graphviz_glob = base_system_gems.join("cache/ruby-graphviz*") - Pathname.glob(graphviz_glob).first + "ruby-graphviz --version 1.2.4" end before do - system_gems ruby_graphviz + realworld_system_gems ruby_graphviz end it "graphs gems from the Gemfile" do @@ -82,7 +81,7 @@ RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do end end - system_gems ruby_graphviz, "graphviz-999", :gem_repo => gem_repo4 + system_gems "graphviz-999", :gem_repo => gem_repo4 end it "loads the correct ruby-graphviz gem" do diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index df2fdd263a..4bf07e7844 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -543,12 +543,11 @@ The :gist git source is deprecated, and will be removed in the future. Add this context "bundle viz" do let(:ruby_graphviz) do - graphviz_glob = base_system_gems.join("cache/ruby-graphviz*") - Pathname.glob(graphviz_glob).first + "ruby-graphviz --version 1.2.4" end before do - system_gems ruby_graphviz + realworld_system_gems ruby_graphviz create_file "gems.rb" bundle "viz" end diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb index 62e2274fbe..4534447ff5 100644 --- a/spec/support/rubygems_ext.rb +++ b/spec/support/rubygems_ext.rb @@ -22,9 +22,6 @@ module Spec # Rake version has to be consistent for tests to pass "rake" => "13.0.1", "builder" => "~> 3.2", - # ruby-graphviz is used by the viz tests - # for >= Ruby 2.3 - "ruby-graphviz" => "1.2.4", } extend self -- cgit v1.2.1