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

Methods included from Connections

#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

#expect_metadata_passthrough(stub_class, method_name, expectation_target) ⇒ Object



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 (stub_class, method_name, expectation_target)
   = { user: "foo", password: "bar" }
  handler = (stub_class, metadata: , timeout: 1)
  inner_stub = handler.instance_variable_get("@stub")
  expect(inner_stub).to receive(expectation_target).with(anything, hash_including(metadata: )).and_call_original
  return handler
end

#expect_metadata_passthrough_namespace(stub_class, method_name, expectation_target, namespace) ⇒ Object



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 (stub_class, method_name, expectation_target, namespace)
   = { user: "foo", password: "bar" }
  handler = (stub_class, metadata: , timeout: 1, namespace: namespace)
  inner_stub = handler.instance_variable_get("@stub")
  expect(inner_stub).to receive(expectation_target).with(anything, hash_including(metadata: )).and_call_original
  return handler
end