class RSpec::SleepingKingStudios::Configuration::Examples
Configuration
options for RSpec::SleepingKingStudios::Examples
.
Constants
- MISSING_FAILURE_MESSAGE_HANDLERS
-
Permitted options for :handle_missing_failure_message_with.
- STRING_FAILURE_MESSAGE_MATCH_OPTIONS
-
Options for matching failure messages to strings.
Public Instance Methods
Source
# File lib/rspec/sleeping_king_studios/configuration.rb, line 20 def handle_missing_failure_message_with @handle_missing_failure_message_with ||= :pending end
Gets the handler for missing failure messages when using the matcher examples, and sets to :pending if unset.
@return [Symbol] The current missing message handler.
Source
# File lib/rspec/sleeping_king_studios/configuration.rb, line 32 def handle_missing_failure_message_with=(value) value = value.to_s.intern unless MISSING_FAILURE_MESSAGE_HANDLERS.include?(value) message = 'unrecognized handler value -- must be in ' \ "#{MISSING_FAILURE_MESSAGE_HANDLERS.join ', '}" raise ArgumentError, message end @handle_missing_failure_message_with = value end
Sets the handler for missing failure messages when using the matcher examples.
@param [Symbol] value The desired handler. Must be :ignore, :pending,
or :exception.
@raise ArgumentError If the handler is not one of the recognized
values.
Source
# File lib/rspec/sleeping_king_studios/configuration.rb, line 50 def match_string_failure_message_as @match_string_failure_message_as ||= :substring end
Gets the option for matching failure messages to strings, and sets to :substring if unset.
@return [Symbol] The current failure message string matching option.
Source
# File lib/rspec/sleeping_king_studios/configuration.rb, line 61 def match_string_failure_message_as=(value) value = value.to_s.intern value = :substring if value == :partial unless STRING_FAILURE_MESSAGE_MATCH_OPTIONS.include?(value) message = 'unrecognized value -- must be in ' \ "#{STRING_FAILURE_MESSAGE_MATCH_OPTIONS.join ', '}" raise ArgumentError, message end @match_string_failure_message_as = value end
Sets the option for matching failure messages to strings.
@param [Symbol] value The desired option. Must be :exact, :substring, or
:partial (alias of :substring).
@raise ArgumentError If the handler is not one of the recognized
values.