diff options
-rw-r--r-- | spec/super_good/solidus_taxjar/api_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/super_good/solidus_taxjar/api_spec.rb b/spec/super_good/solidus_taxjar/api_spec.rb index df46a11..cdfed4e 100644 --- a/spec/super_good/solidus_taxjar/api_spec.rb +++ b/spec/super_good/solidus_taxjar/api_spec.rb @@ -5,7 +5,8 @@ RSpec.describe SuperGood::SolidusTaxjar::Api do subject { described_class.new } before do - ENV["TAXJAR_API_KEY"] = 'taxjar_api_token' + allow(ENV).to receive(:fetch).and_call_original + allow(ENV).to receive(:fetch).with("TAXJAR_API_KEY").and_return("taxjar_api_token") end it "sets the correct headers" do @@ -21,7 +22,8 @@ RSpec.describe SuperGood::SolidusTaxjar::Api do subject { described_class.default_taxjar_client } before do - ENV["TAXJAR_API_KEY"] = 'taxjar_api_token' + allow(ENV).to receive(:fetch).and_call_original + allow(ENV).to receive(:fetch).with("TAXJAR_API_KEY").and_return("taxjar_api_token") end it "returns an instance of the TaxJar client" do |