Class: ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::SubMatchers::ReturnCustomValue
- Inherits:
-
Base
- Object
- Base
- ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::SubMatchers::ReturnCustomValue
- Defined in:
- lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_custom_value.rb
Instance Attribute Summary
Attributes inherited from Base
#block_expectation_value, #matcher
Instance Method Summary collapse
- #failure_message ⇒ String
- #failure_message_when_negated ⇒ String
- #matches?(block_expectation_value) ⇒ Boolean
Methods inherited from Base
#apply_stubs!, #does_not_match?, #initialize
Constructor Details
This class inherits a constructor from ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::SubMatchers::Base
Instance Method Details
#failure_message ⇒ String
34 35 36 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_custom_value.rb', line 34 def [, same_visual_output_note].reject(&:empty?).join("\n\n") end |
#failure_message_when_negated ⇒ String
41 42 43 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_custom_value.rb', line 41 def "expected `#{inputs.printable_block_expectation}` NOT to delegate to `#{inputs.printable_method}` and return custom value `#{inputs.custom_return_value.inspect}`, but it did." end |
#matches?(block_expectation_value) ⇒ Boolean
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/return_custom_value.rb', line 18 def matches?(block_expectation_value) super ## # specify do # expect { require_dependencies_not_pure } # .to delegate_to(RequireDependenciesNotPure, :call) # .and_return { |delegation_value| delegation_value.to_s } # end # block_expectation_value == inputs.custom_return_value end |