lib/conjur/command/rspec/mock_services.rb in conjur-cli-5.6.6 vs lib/conjur/command/rspec/mock_services.rb in conjur-cli-6.0.0.rc1

- old
+ new

@@ -1,13 +1,14 @@ shared_context "with fake endpoints and test config" do let(:authn_host) { 'https://authn.example.com' } let(:authz_host) { 'https://authz.example.com' } let(:core_host) { 'https://core.example.com/api' } before do - allow(Conjur::Authn::API).to receive(:host) { authn_host } - allow(Conjur::Authz::API).to receive(:host) { authz_host } - allow(Conjur::Core::API).to receive(:host) { core_host } + allow(Conjur.configuration).to receive(:account) { account } + allow(Conjur.configuration).to receive(:authn_url) { authn_host } + allow(Conjur.configuration).to receive(:authz_url) { authz_host } + allow(Conjur.configuration).to receive(:core_url) { core_host } ENV['GLI_DEBUG'] = 'true' end end @@ -18,10 +19,9 @@ let(:account) { 'the-account' } let(:username) { 'dknuth' } let(:api_key) { 'sekrit' } let(:api) { Conjur::API.new_from_key(username, api_key) } before do - allow(Conjur::Core::API).to receive(:conjur_account) { account } allow(Conjur::Authn).to receive_messages(netrc: netrc, host: authn_host) Conjur::Config.merge 'account' => account end end