summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-05-24 20:31:19 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-05-24 20:32:18 +0200
commit279603ab429e74f82d21b9f637b49c1db85c0427 (patch)
tree292a1d4e2945a09908a5402c5d5986aa2543c8cc
parenta4d04506ab0bbdcc0f214afd2eebbb09bea18b9c (diff)
downloadbundler-279603ab429e74f82d21b9f637b49c1db85c0427.tar.gz
Add missing no-color source specs
For consistency.
-rw-r--r--spec/bundler/source_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/bundler/source_spec.rb b/spec/bundler/source_spec.rb
index a39099a446..00eb05ed88 100644
--- a/spec/bundler/source_spec.rb
+++ b/spec/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