|
43 | 43 | it do |
44 | 44 | expect(api.provider.metadata).is_a?(OpenFeature::SDK::Metadata) |
45 | 45 | end |
46 | | - |
47 | | - it do |
48 | | - expect(api.provider.metadata).to eq(OpenFeature::SDK::Metadata.new(name: OpenFeature::SDK::Provider::NoOpProvider::NAME)) |
49 | | - end |
50 | 46 | end |
51 | 47 |
|
52 | 48 | context "with Requirement 1.1.5" do |
|
55 | 51 | config.set_provider(OpenFeature::SDK::Provider::NoOpProvider.new) |
56 | 52 | end |
57 | 53 |
|
58 | | - api.build_client(name: "requirement-1.1.5") |
| 54 | + api.build_client |
59 | 55 | end |
60 | 56 |
|
61 | 57 | it "provide a function for creating a client which accepts the following options: * name (optional): A logical string identifier for the client." do |
62 | | - expect(api).to respond_to(:build_client).with_keywords(:name, :version) |
| 58 | + expect(api).to respond_to(:build_client).with_keywords(:version) |
63 | 59 | end |
64 | 60 |
|
65 | 61 | it do |
|
76 | 72 | provider = OpenFeature::SDK::Provider::InMemoryProvider.new |
77 | 73 |
|
78 | 74 | api.configure do |config| |
79 | | - config.set_provider(provider, domain: 'testing1') |
| 75 | + config.set_provider(provider, domain: "testing1") |
80 | 76 | end |
81 | 77 |
|
82 | | - client = api.build_client(name: "with-domain", domain: "testing1") |
83 | | - no_domain_client = api.build_client(name: "without-domain") |
| 78 | + client = api.build_client(domain: "testing1") |
| 79 | + no_domain_client = api.build_client |
84 | 80 |
|
85 | 81 | expect(client.provider).to be(provider) |
86 | 82 | expect(no_domain_client.provider).to be_an_instance_of(OpenFeature::SDK::Provider::NoOpProvider) |
|
95 | 91 | config.set_provider(provider) |
96 | 92 | end |
97 | 93 |
|
98 | | - no_domain_client = api.build_client(name: "without-domain") |
| 94 | + no_domain_client = api.build_client |
99 | 95 |
|
100 | 96 | expect(no_domain_client.provider).to be(provider) |
101 | 97 | end |
|
105 | 101 | config.set_provider(OpenFeature::SDK::Provider::InMemoryProvider.new) |
106 | 102 | end |
107 | 103 |
|
108 | | - domain_client = api.build_client(name: "with-domain", domain: "testing2") |
| 104 | + domain_client = api.build_client(domain: "testing2") |
109 | 105 | # This domain was never given a provider, so it should default to the NoOpProvider |
110 | 106 | expect(domain_client.provider).to be_an_instance_of(OpenFeature::SDK::Provider::NoOpProvider) |
111 | 107 | end |
|
0 commit comments