File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,17 @@ def self.apply_custom_colors(colors)
9494 end
9595 apply_custom_colors ( ENV [ 'CUCUMBER_COLORS' ] ) if ENV [ 'CUCUMBER_COLORS' ]
9696
97+ # Provide an instance method of the same name, in case users are using it.
98+
99+ # Apply the custom color scheme
100+ #
101+ # example:
102+ #
103+ # apply_custom_colors('passed=white')
104+ def apply_custom_colors ( colors )
105+ ANSIColor . apply_custom_colors ( colors )
106+ end
107+
97108 # Define the color-named methods required by Term::ANSIColor.
98109 #
99110 # Examples:
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module Formatter
3636
3737 context 'with custom color scheme' do
3838 before do
39- ANSIColor . apply_custom_colors ( 'passed=red,bold' )
39+ apply_custom_colors ( 'passed=red,bold' )
4040 end
4141
4242 after do
@@ -48,7 +48,7 @@ module Formatter
4848 end
4949
5050 def reset_colours_to_default
51- ANSIColor . apply_custom_colors ( 'passed=green' )
51+ apply_custom_colors ( 'passed=green' )
5252 end
5353 end
5454 end
You can’t perform that action at this time.
0 commit comments