summaryrefslogtreecommitdiff
path: root/spec/bundler/source_spec.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-06-27 18:36:12 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-06-27 18:36:12 -0500
commit00aebf2320b72635e212c17c64bc84c58dce4a53 (patch)
tree8845b21e8dd1ab9f5b64024350de05b145f32062 /spec/bundler/source_spec.rb
parent58fc66897b156ce91eb98710f7708f8abe36c806 (diff)
downloadbundler-00aebf2320b72635e212c17c64bc84c58dce4a53.tar.gz
Fix spurious spec failures due to leaking Bundler.uiseg-specs-reset-ui
Diffstat (limited to 'spec/bundler/source_spec.rb')
-rw-r--r--spec/bundler/source_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/bundler/source_spec.rb b/spec/bundler/source_spec.rb
index fc28220c7d..25abd90c96 100644
--- a/spec/bundler/source_spec.rb
+++ b/spec/bundler/source_spec.rb
@@ -57,8 +57,18 @@ describe Bundler::Source do
context "with a different version" do
let(:locked_gem) { double(:locked_gem, :name => "nokogiri", :version => "< 1.5") }
- it "should return a string with the spec name and version and locked spec version" do
- expect(subject.version_message(spec)).to eq("nokogiri >= 1.6 (\e[32mwas < 1.5\e[0m)")
+ context "with color" do
+ before { Bundler.ui = Bundler::UI::Shell.new }
+
+ it "should return a string with the spec name and version and locked spec version" do
+ expect(subject.version_message(spec)).to eq("nokogiri >= 1.6 (\e[32mwas < 1.5\e[0m)")
+ end
+ end
+
+ context "without color" do
+ it "should return a string with the spec name and version and locked spec version" do
+ expect(subject.version_message(spec)).to eq("nokogiri >= 1.6 (was < 1.5)")
+ end
end
end
end