[前][次][番号順一覧][スレッド一覧]

ruby-changes:54933

From: hsbt <ko1@a...>
Date: Wed, 27 Feb 2019 21:40:27 +0900 (JST)
Subject: [ruby-changes:54933] hsbt:r67138 (trunk): skip to not support color tty environment.

hsbt	2019-02-27 21:40:19 +0900 (Wed, 27 Feb 2019)

  New Revision: 67138

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67138

  Log:
    skip to not support color tty environment.

  Modified files:
    trunk/spec/bundler/bundler/source_spec.rb
Index: spec/bundler/bundler/source_spec.rb
===================================================================
--- spec/bundler/bundler/source_spec.rb	(revision 67137)
+++ spec/bundler/bundler/source_spec.rb	(revision 67138)
@@ -60,6 +60,10 @@ RSpec.describe Bundler::Source do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/source_spec.rb#L60
             before { Bundler.ui = Bundler::UI::Shell.new }
 
             it "should return a string with the spec name and version and locked spec version" do
+              if Bundler.ui.instance_variable_get(:@shell).is_a?(Bundler::Thor::Shell::Basic)
+                skip "tty color is not supported with Thor::Shell::Basic environment."
+              end
+
               expect(subject.version_message(spec)).to eq("nokogiri >= 1.6\e[32m (was < 1.5)\e[0m")
             end
           end
@@ -79,6 +83,10 @@ RSpec.describe Bundler::Source do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/source_spec.rb#L83
             before { Bundler.ui = Bundler::UI::Shell.new }
 
             it "should return a string with the locked spec version in yellow" do
+              if Bundler.ui.instance_variable_get(:@shell).is_a?(Bundler::Thor::Shell::Basic)
+                skip "tty color is not supported with Thor::Shell::Basic environment."
+              end
+
               expect(subject.version_message(spec)).to eq("nokogiri 1.6.1\e[33m (was 1.7.0)\e[0m")
             end
           end
@@ -92,6 +100,10 @@ RSpec.describe Bundler::Source do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/source_spec.rb#L100
             before { Bundler.ui = Bundler::UI::Shell.new }
 
             it "should return a string with the locked spec version in green" do
+              if Bundler.ui.instance_variable_get(:@shell).is_a?(Bundler::Thor::Shell::Basic)
+                skip "tty color is not supported with Thor::Shell::Basic environment."
+              end
+
               expect(subject.version_message(spec)).to eq("nokogiri 1.7.1\e[32m (was 1.7.0)\e[0m")
             end
           end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]