Skip to content

Commit

Permalink
Merge pull request #106 from seand7565/fix_linter
Browse files Browse the repository at this point in the history
Update specs to comply with new rubocop regulations
  • Loading branch information
kennyadsl authored Oct 21, 2020
2 parents fa5d9fa + a7d89d4 commit 26232e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spec/lib/solidus_paypal_commerce_platform/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let(:status_code) { 201 }

it 'forwards to the upstream client adding i18n response messages' do
expect_any_instance_of(PayPal::PayPalHttpClient)
allow_any_instance_of(PayPal::PayPalHttpClient)
.to receive(:execute).with(paypal_request).and_return(paypal_response)

response = subject.execute_with_response(paypal_request)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
it "falls back to Rails.env if ENV['PAYPAL_ENV'] is not set" do
expect(ENV).to receive(:[]).with("PAYPAL_ENV").and_return(nil).at_least(:once)

expect(Rails).to receive(:env).and_return("development".inquiry)
allow(Rails).to receive(:env).and_return("development".inquiry)
expect(subject.default_env).to eq("sandbox")

expect(Rails).to receive(:env).and_return("test".inquiry)
allow(Rails).to receive(:env).and_return("test".inquiry)
expect(subject.default_env).to eq("sandbox")

expect(Rails).to receive(:env).and_return("production".inquiry)
allow(Rails).to receive(:env).and_return("production".inquiry)
expect(subject.default_env).to eq("live")

expect(Rails).to receive(:env).and_return("staging".inquiry)
allow(Rails).to receive(:env).and_return("staging".inquiry)
expect{ subject.default_env }.to raise_error(described_class::InvalidEnvironment)
end
end
Expand Down

0 comments on commit 26232e1

Please sign in to comment.