From 2a444506fa5f7216136aab5e407f88e8b98c4dcf Mon Sep 17 00:00:00 2001 From: Scott Carleton <313254+ScotterC@users.noreply.github.com> Date: Thu, 8 Aug 2024 17:25:02 -0400 Subject: [PATCH] reset config --- spec/pinecone_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/pinecone_spec.rb b/spec/pinecone_spec.rb index f9660c2..0c20cdb 100644 --- a/spec/pinecone_spec.rb +++ b/spec/pinecone_spec.rb @@ -24,16 +24,16 @@ context "without an api key" do let(:api_key) { nil } - before do + it "raises an error" do + expect { + Pinecone::Client.new.list_indexes + }.to raise_error(Pinecone::ConfigurationError) + + # reset the configuration Pinecone.configure do |config| - config.api_key = nil - config.environment = nil + config.api_key = "foo" end end - - it "raises an error" do - expect { Pinecone::Client.new.list_indexes }.to raise_error(Pinecone::ConfigurationError) - end end end end