File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def can_display_colors?
101
101
end
102
102
103
103
def are_colors_supported?
104
- stdout . tty? && ! [ nil , "dumb" ] . include? ( ENV [ "TERM" ] )
104
+ stdout . tty? && ENV [ "TERM" ] != "dumb"
105
105
end
106
106
107
107
def are_colors_disabled?
Original file line number Diff line number Diff line change @@ -145,12 +145,6 @@ def shell
145
145
expect ( colorless ) . to eq ( "hi!" )
146
146
end
147
147
148
- it "does nothing when the TERM environment variable is not set" do
149
- allow ( ENV ) . to receive ( :[] ) . with ( "TERM" ) . and_return ( nil )
150
- colorless = shell . set_color "hi!" , :white
151
- expect ( colorless ) . to eq ( "hi!" )
152
- end
153
-
154
148
it "does nothing when the NO_COLOR environment variable is set" do
155
149
allow ( ENV ) . to receive ( :[] ) . with ( "NO_COLOR" ) . and_return ( "" )
156
150
allow ( $stdout) . to receive ( :tty? ) . and_return ( true )
You can’t perform that action at this time.
0 commit comments