Class: ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
- Inherits:
-
Object
- Object
- ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
- Includes:
- Support::Delegate
- Defined in:
- lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/delegation.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings_collection.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/base.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/base.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings_collection/exceptions.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/with_calling_original.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/return_its_value.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/without_arguments.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_any_arguments.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/values/without_calling_original.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/with_concrete_arguments.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments/commands/generate_printable_arguments.rb,
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/entities/chainings/sub_matchers/arguments/commands/apply_stub_to_track_delegations.rb
Defined Under Namespace
Modules: Entities
Instance Method Summary collapse
- #and_return_its_value ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
- #description ⇒ String
- #failure_message ⇒ String
- #failure_message_when_negated ⇒ String
-
#initialize(object = nil, method = nil, matcher: nil) ⇒ DelegateTo
constructor
A new instance of DelegateTo.
- #matches? ⇒ Boolean
- #supports_block_expectations? ⇒ Object
- #with_any_arguments ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
- #with_arguments ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
- #without_arguments ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
- #without_calling_original ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
Methods included from Support::Concern
Constructor Details
#initialize(object, method) ⇒ void #initialize(matcher) ⇒ void
Returns a new instance of DelegateTo.
63 64 65 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 63 def initialize(object = nil, method = nil, matcher: nil) @matcher = matcher || Entities::Matcher.new(object, method) end |
Instance Method Details
#and_return_its_value ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
101 102 103 104 105 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 101 def and_return_its_value matcher.and_return_its_value self end |
#description ⇒ String
37 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 37 delegate :description, to: :matcher |
#failure_message ⇒ String
42 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 42 delegate :failure_message, to: :matcher |
#failure_message_when_negated ⇒ String
47 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 47 delegate :failure_message_when_negated, to: :matcher |
#matches? ⇒ Boolean
25 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 25 delegate :matches?, to: :matcher |
#supports_block_expectations? ⇒ Object
32 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 32 delegate :supports_block_expectations?, to: :matcher |
#with_any_arguments ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
81 82 83 84 85 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 81 def with_any_arguments matcher.with_any_arguments self end |
#with_arguments ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
71 72 73 74 75 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 71 def with_arguments(...) matcher.with_arguments(...) self end |
#without_arguments ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
91 92 93 94 95 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 91 def without_arguments matcher.without_arguments self end |
#without_calling_original ⇒ ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo
119 120 121 122 123 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to.rb', line 119 def without_calling_original matcher.without_calling_original self end |