Module: Helpers::MetadataPassthrough
- Includes:
- Connections
- Included in:
- TestInstance
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/etcdv3-0.11.5/spec/helpers/metadata_passthrough.rb
Instance Method Summary
collapse
#full_local_url, #local_connection, #local_connection_with_auth, #local_connection_with_namespace, #local_connection_with_timeout, #local_namespace_stub, #local_namespace_stub_with_metadata, #local_stub, #local_stub_with_metadata, #local_url, #port
Instance Method Details
5
6
7
8
9
10
11
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/etcdv3-0.11.5/spec/helpers/metadata_passthrough.rb', line 5
def expect_metadata_passthrough(stub_class, method_name, expectation_target)
metadata = { user: "foo", password: "bar" }
handler = local_stub_with_metadata(stub_class, metadata: metadata, timeout: 1)
inner_stub = handler.instance_variable_get("@stub")
expect(inner_stub).to receive(expectation_target).with(anything, hash_including(metadata: metadata)).and_call_original
return handler
end
|
13
14
15
16
17
18
19
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/etcdv3-0.11.5/spec/helpers/metadata_passthrough.rb', line 13
def expect_metadata_passthrough_namespace(stub_class, method_name, expectation_target, namespace)
metadata = { user: "foo", password: "bar" }
handler = local_namespace_stub_with_metadata(stub_class, metadata: metadata, timeout: 1, namespace: namespace)
inner_stub = handler.instance_variable_get("@stub")
expect(inner_stub).to receive(expectation_target).with(anything, hash_including(metadata: metadata)).and_call_original
return handler
end
|