Class: RSpec::Matchers::BuiltIn::YieldControl Private

Inherits:
BaseMatcher
  • Object
show all
Includes:
CountExpectation
Defined in:
lib/rspec/matchers/built_in/yield.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Provides the implementation for yield_control. Not intended to be instantiated directly.

Constant Summary

Constants inherited from BaseMatcher

BaseMatcher::UNDEFINED

Instance Method Summary collapse

Methods included from CountExpectation

#at_least, #at_most, #exactly, #once, #thrice, #times, #twice

Methods inherited from BaseMatcher

#description, #diffable?, #expects_call_stack_jump?, #initialize, #match_unless_raises

Methods included from Composable

#===, #and, #description_of, #or, should_enumerate?, surface_descriptions_in, unreadable_io?, #values_match?

Constructor Details

This class inherits a constructor from RSpec::Matchers::BuiltIn::BaseMatcher

Instance Method Details

#failure_messageString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


117
118
119
# File 'lib/rspec/matchers/built_in/yield.rb', line 117

def failure_message
  'expected given block to yield control' + failure_reason
end

#failure_message_when_negatedString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


123
124
125
# File 'lib/rspec/matchers/built_in/yield.rb', line 123

def failure_message_when_negated
  'expected given block not to yield control' + failure_reason
end