From 38df9e18da1bbb4c74b572c51db64745e6bee853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 24 May 2019 20:31:19 +0200 Subject: [PATCH] [bundler/bundler] Add missing no-color source specs For consistency. https://github.com/bundler/bundler/commit/279603ab42 --- spec/bundler/bundler/source_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/bundler/bundler/source_spec.rb b/spec/bundler/bundler/source_spec.rb index a39099a446..00eb05ed88 100644 --- a/spec/bundler/bundler/source_spec.rb +++ b/spec/bundler/bundler/source_spec.rb @@ -84,6 +84,14 @@ RSpec.describe Bundler::Source do expect(subject.version_message(spec)).to eq("nokogiri 1.6.1\e[33m (was 1.7.0)\e[0m") end end + + context "without color" do + before { Bundler.ui = Bundler::UI::Shell.new("no-color" => true) } + + it "should return a string with the locked spec version in yellow" do + expect(subject.version_message(spec)).to eq("nokogiri 1.6.1 (was 1.7.0)") + end + end end context "with an older version" do @@ -97,6 +105,14 @@ RSpec.describe Bundler::Source do expect(subject.version_message(spec)).to eq("nokogiri 1.7.1\e[32m (was 1.7.0)\e[0m") end end + + context "without color" do + before { Bundler.ui = Bundler::UI::Shell.new("no-color" => true) } + + it "should return a string with the locked spec version in yellow" do + expect(subject.version_message(spec)).to eq("nokogiri 1.7.1 (was 1.7.0)") + end + end end end