summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAdnan Abdulally <adnan.abdulally@printivity.com>2021-01-29 10:27:06 -0800
committerNoah Silvera <noah@super.gd>2021-03-17 07:11:08 -0700
commit37fa5e7c81ee44012c86eabb140db760d55eae3b (patch)
tree0d8b8b9efe31b8999f06b3d18ea5f6f50049ef96 /spec
parent51ff05c3de3500fdc6aee55e2919646028055286 (diff)
Rename classes that have API in their name to Api
This done so Zeitwerk can correctly can correctly load the class from the filename. Co-authored-by: Nick Van Doorn <nick@super.gd>
Diffstat (limited to 'spec')
-rw-r--r--spec/super_good/solidus_taxjar/addresses_spec.rb4
-rw-r--r--spec/super_good/solidus_taxjar/api_params_spec.rb2
-rw-r--r--spec/super_good/solidus_taxjar/api_spec.rb16
-rw-r--r--spec/super_good/solidus_taxjar/tax_calculator_spec.rb2
-rw-r--r--spec/super_good/solidus_taxjar/tax_rate_calculator_spec.rb2
-rw-r--r--spec/super_good/solidus_taxjar_spec.rb2
6 files changed, 14 insertions, 14 deletions
diff --git a/spec/super_good/solidus_taxjar/addresses_spec.rb b/spec/super_good/solidus_taxjar/addresses_spec.rb
index b62de7b..4995b12 100644
--- a/spec/super_good/solidus_taxjar/addresses_spec.rb
+++ b/spec/super_good/solidus_taxjar/addresses_spec.rb
@@ -38,7 +38,7 @@ RSpec.describe SuperGood::SolidusTaxjar::Addresses do
}
let(:dummy_api) {
- instance_double ::SuperGood::SolidusTaxjar::API
+ instance_double ::SuperGood::SolidusTaxjar::Api
}
context "when there are no possibilities for the address" do
@@ -171,7 +171,7 @@ RSpec.describe SuperGood::SolidusTaxjar::Addresses do
}
let(:dummy_api) {
- instance_double ::SuperGood::SolidusTaxjar::API
+ instance_double ::SuperGood::SolidusTaxjar::Api
}
context "when there are no possibilities for the address" do
diff --git a/spec/super_good/solidus_taxjar/api_params_spec.rb b/spec/super_good/solidus_taxjar/api_params_spec.rb
index 4c729e6..0fc54f6 100644
--- a/spec/super_good/solidus_taxjar/api_params_spec.rb
+++ b/spec/super_good/solidus_taxjar/api_params_spec.rb
@@ -1,6 +1,6 @@
require "spec_helper"
-RSpec.describe SuperGood::SolidusTaxjar::APIParams do
+RSpec.describe SuperGood::SolidusTaxjar::ApiParams do
let(:order) do
Spree::Order.create!(
additional_tax_total: BigDecimal("9.87"),
diff --git a/spec/super_good/solidus_taxjar/api_spec.rb b/spec/super_good/solidus_taxjar/api_spec.rb
index 189ff17..a1282a7 100644
--- a/spec/super_good/solidus_taxjar/api_spec.rb
+++ b/spec/super_good/solidus_taxjar/api_spec.rb
@@ -1,6 +1,6 @@
require "spec_helper"
-RSpec.describe SuperGood::SolidusTaxjar::API do
+RSpec.describe SuperGood::SolidusTaxjar::Api do
describe ".new" do
subject { described_class.new }
@@ -27,7 +27,7 @@ RSpec.describe SuperGood::SolidusTaxjar::API do
let(:order) { Spree::Order.new }
before do
- allow(SuperGood::SolidusTaxjar::APIParams)
+ allow(SuperGood::SolidusTaxjar::ApiParams)
.to receive(:order_params)
.with(order)
.and_return({order: "params"})
@@ -51,7 +51,7 @@ RSpec.describe SuperGood::SolidusTaxjar::API do
let(:response) { double(rate: tax_rate) }
before do
- allow(SuperGood::SolidusTaxjar::APIParams)
+ allow(SuperGood::SolidusTaxjar::ApiParams)
.to receive(:tax_rate_address_params)
.with(address)
.and_return({address: "params"})
@@ -73,7 +73,7 @@ RSpec.describe SuperGood::SolidusTaxjar::API do
let(:address) { Spree::Address.new }
before do
- allow(SuperGood::SolidusTaxjar::APIParams)
+ allow(SuperGood::SolidusTaxjar::ApiParams)
.to receive(:address_params)
.with(address)
.and_return(["zipcode", {address: "params"}])
@@ -95,7 +95,7 @@ RSpec.describe SuperGood::SolidusTaxjar::API do
let(:order) { Spree::Order.new }
before do
- allow(SuperGood::SolidusTaxjar::APIParams)
+ allow(SuperGood::SolidusTaxjar::ApiParams)
.to receive(:transaction_params)
.with(order)
.and_return({transaction: "params"})
@@ -117,7 +117,7 @@ RSpec.describe SuperGood::SolidusTaxjar::API do
let(:order) { Spree::Order.new }
before do
- allow(SuperGood::SolidusTaxjar::APIParams)
+ allow(SuperGood::SolidusTaxjar::ApiParams)
.to receive(:transaction_params)
.with(order)
.and_return({transaction: "params"})
@@ -156,7 +156,7 @@ RSpec.describe SuperGood::SolidusTaxjar::API do
let(:reimbursement) { Spree::Reimbursement.new }
before do
- allow(SuperGood::SolidusTaxjar::APIParams)
+ allow(SuperGood::SolidusTaxjar::ApiParams)
.to receive(:refund_params)
.with(reimbursement)
.and_return({refund: "params"})
@@ -178,7 +178,7 @@ RSpec.describe SuperGood::SolidusTaxjar::API do
let(:spree_address) { build :address }
before do
- allow(SuperGood::SolidusTaxjar::APIParams)
+ allow(SuperGood::SolidusTaxjar::ApiParams)
.to receive(:validate_address_params)
.with(spree_address)
.and_return({address: "params"})
diff --git a/spec/super_good/solidus_taxjar/tax_calculator_spec.rb b/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
index 7609a83..3386022 100644
--- a/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
+++ b/spec/super_good/solidus_taxjar/tax_calculator_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe ::SuperGood::SolidusTaxjar::TaxCalculator do
let(:calculator) { described_class.new(order, api: dummy_api) }
let(:dummy_api) do
- instance_double ::SuperGood::SolidusTaxjar::API
+ instance_double ::SuperGood::SolidusTaxjar::Api
end
let(:order) do
diff --git a/spec/super_good/solidus_taxjar/tax_rate_calculator_spec.rb b/spec/super_good/solidus_taxjar/tax_rate_calculator_spec.rb
index de7eb26..1757d19 100644
--- a/spec/super_good/solidus_taxjar/tax_rate_calculator_spec.rb
+++ b/spec/super_good/solidus_taxjar/tax_rate_calculator_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe ::SuperGood::SolidusTaxjar::TaxRateCalculator do
let(:calculator) { described_class.new(address, api: dummy_api) }
let(:dummy_api) do
- instance_double ::SuperGood::SolidusTaxjar::API
+ instance_double ::SuperGood::SolidusTaxjar::Api
end
let(:dummy_tax_rate) { BigDecimal(0) }
diff --git a/spec/super_good/solidus_taxjar_spec.rb b/spec/super_good/solidus_taxjar_spec.rb
index 865ed8b..6236b2f 100644
--- a/spec/super_good/solidus_taxjar_spec.rb
+++ b/spec/super_good/solidus_taxjar_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe SuperGood::SolidusTaxjar do
let(:order) { Spree::Order.new }
it "returns the API params converted to JSON" do
- allow(SuperGood::SolidusTaxjar::APIParams)
+ allow(SuperGood::SolidusTaxjar::ApiParams)
.to receive(:order_params)
.with(order)
.and_return({some: "hash", with: "stuff", in: "it"})