From eec1cca3024830b4a3e411dde79d804479233422 Mon Sep 17 00:00:00 2001 From: Iulian Masar Date: Wed, 15 Nov 2023 11:29:41 +0200 Subject: [PATCH] small update --- spec/mangopay/configuration_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/mangopay/configuration_spec.rb b/spec/mangopay/configuration_spec.rb index 51d34bd..3234c9c 100644 --- a/spec/mangopay/configuration_spec.rb +++ b/spec/mangopay/configuration_spec.rb @@ -27,11 +27,11 @@ valid_config.preproduction = true # add the 2 configs to the list of MangoPay configs - MangoPay::add_config('wrong', wrong_config) - MangoPay::add_config('valid', valid_config) + MangoPay.add_config('wrong', wrong_config) + MangoPay.add_config('valid', valid_config) # apply wrong config - MangoPay::get_config('wrong').apply_configuration + MangoPay.get_config('wrong').apply_configuration expect { MangoPay::User.fetch() @@ -42,7 +42,7 @@ } # apply valid configuration - MangoPay::get_config('valid').apply_configuration + MangoPay.get_config('valid').apply_configuration # expect success users = MangoPay::User.fetch() @@ -51,7 +51,7 @@ it 'fails when fetching a config that does not exist' do expect { - MangoPay::get_config('placeholder') + MangoPay.get_config('placeholder') }.to raise_error { |err| expect(err).to be_a RuntimeError expect(err.message).to eq "Could not find any configuration with name 'placeholder'" @@ -64,17 +64,17 @@ wrong_config.client_apiKey = '0000' wrong_config.preproduction = true - MangoPay::add_config('wrong', wrong_config) + MangoPay.add_config('wrong', wrong_config) # pass when fetching config before removing it - MangoPay::get_config('wrong') + MangoPay.get_config('wrong') # remove config - MangoPay::remove_config('wrong') + MangoPay.remove_config('wrong') # fail when trying to fetch after removal expect { - MangoPay::get_config('wrong') + MangoPay.get_config('wrong') }.to raise_error { |err| expect(err).to be_a RuntimeError expect(err.message).to eq "Could not find any configuration with name 'wrong'"