Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 19c255c

Browse files
FIXED: replaced color= method with attr_writer :color so it actually replaces the correct method
1 parent c72d232 commit 19c255c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/rspec/core/configuration.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,9 @@ def full_backtrace=(true_or_false)
695695
#
696696
# @see color_enabled?
697697
# @return [Boolean]
698-
attr_writer :color
698+
def color
699+
value_for(:color) { @color }
700+
end
699701

700702
# Check if color is enabled for a particular output.
701703
# @param output [IO] an output stream to use, defaults to the current
@@ -706,11 +708,7 @@ def color_enabled?(output=output_stream)
706708
end
707709

708710
# Toggle output color.
709-
# @attr true_or_false [Boolean] toggle color enabled
710-
def color=(true_or_false)
711-
return unless true_or_false
712-
@color = !!true_or_false
713-
end
711+
attr_writer :color
714712

715713
# @private
716714
def libs=(libs)

0 commit comments

Comments
 (0)