diff options
Diffstat (limited to 'spec/bundler/commands/viz_spec.rb')
-rw-r--r-- | spec/bundler/commands/viz_spec.rb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/spec/bundler/commands/viz_spec.rb b/spec/bundler/commands/viz_spec.rb index 0efb24b504..f8b5f7836e 100644 --- a/spec/bundler/commands/viz_spec.rb +++ b/spec/bundler/commands/viz_spec.rb @@ -1,10 +1,8 @@ # frozen_string_literal: true -RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do +RSpec.describe "bundle viz", bundler: "< 3", if: Bundler.which("dot"), realworld: true do before do - graphviz_version = RUBY_VERSION >= "2.4" ? "1.2.5" : "1.2.4" - - realworld_system_gems "ruby-graphviz --version #{graphviz_version}" + realworld_system_gems "ruby-graphviz --version 1.2.5" end it "graphs gems from the Gemfile" do @@ -17,8 +15,8 @@ RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do bundle "viz" expect(out).to include("gem_graph.png") - bundle "viz", :format => "debug" - expect(out).to eq(strip_whitespace(<<-DOT).strip) + bundle "viz", format: "debug" + expect(out).to eq(<<~DOT.strip) digraph Gemfile { concentrate = "true"; normalize = "true"; @@ -51,8 +49,8 @@ RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do bundle "viz" expect(out).to include("gem_graph.png") - bundle "viz", :format => :debug, :version => true - expect(out).to eq(strip_whitespace(<<-EOS).strip) + bundle "viz", format: :debug, version: true + expect(out).to eq(<<~EOS.strip) digraph Gemfile { concentrate = "true"; normalize = "true"; @@ -79,7 +77,7 @@ RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do end end - system_gems "graphviz-999", :gem_repo => gem_repo4 + system_gems "graphviz-999", gem_repo: gem_repo4 end it "loads the correct ruby-graphviz gem" do @@ -89,8 +87,8 @@ RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do gem "rack-obama" G - bundle "viz", :format => "debug" - expect(out).to eq(strip_whitespace(<<-DOT).strip) + bundle "viz", format: "debug" + expect(out).to eq(<<~DOT.strip) digraph Gemfile { concentrate = "true"; normalize = "true"; |