Class: RSpec::Expectations::PositiveExpectationHandler
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/handler.rb
Class Method Summary collapse
- .handle_matcher(actual, initial_matcher, custom_message = nil, &block) ⇒ Object
- .opposite_should_method ⇒ Object
- .should_method ⇒ Object
- .verb ⇒ Object
Class Method Details
.handle_matcher(actual, initial_matcher, custom_message = nil, &block) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/handler.rb', line 47 def self.handle_matcher(actual, initial_matcher, =nil, &block) ExpectationHelper.with_matcher(self, initial_matcher, ) do |matcher| return ::RSpec::Matchers::BuiltIn::PositiveOperatorMatcher.new(actual) unless initial_matcher match_result = matcher.matches?(actual, &block) if && match_result.respond_to?(:error_generator) match_result.error_generator.opts[:message] = end match_result || ExpectationHelper.handle_failure(matcher, , :failure_message) end end |
.opposite_should_method ⇒ Object
68 69 70 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/handler.rb', line 68 def self.opposite_should_method :should_not end |
.should_method ⇒ Object
64 65 66 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/handler.rb', line 64 def self.should_method :should end |
.verb ⇒ Object
60 61 62 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/handler.rb', line 60 def self.verb 'is expected to' end |