Class: RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/core/formatters/deprecation_formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ SpecifiedDeprecationMessage

Returns a new instance of SpecifiedDeprecationMessage.



64
65
66
67
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 64

def initialize(data)
  @message = data[:message]
  super deprecation_type_for(data)
end

Instance Attribute Details

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



63
64
65
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 63

def type
  @type
end

Instance Method Details

#to_sObject



69
70
71
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 69

def to_s
  output_formatted @message
end

#too_many_warnings_messageObject



73
74
75
76
77
# File 'lib/rspec/core/formatters/deprecation_formatter.rb', line 73

def too_many_warnings_message
  msg = "Too many similar deprecation messages reported, disregarding further reports. "
  msg << DEPRECATION_STREAM_NOTICE
  msg
end