diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-06-27 18:36:12 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-06-27 18:36:12 -0500 |
commit | 00aebf2320b72635e212c17c64bc84c58dce4a53 (patch) | |
tree | 8845b21e8dd1ab9f5b64024350de05b145f32062 /spec/bundler | |
parent | 58fc66897b156ce91eb98710f7708f8abe36c806 (diff) | |
download | bundler-00aebf2320b72635e212c17c64bc84c58dce4a53.tar.gz |
Fix spurious spec failures due to leaking Bundler.uiseg-specs-reset-ui
Diffstat (limited to 'spec/bundler')
-rw-r--r-- | spec/bundler/source_spec.rb | 14 |
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 |