spec/spec_helper.rb in avatax-17.12.0 vs spec/spec_helper.rb in avatax-18.1.2
- old
+ new
@@ -2,15 +2,15 @@
require 'rspec'
require 'yaml'
AvaTax.configure do |config|
- begin
+ if File.exist?(File.expand_path('../credentials.yaml', __FILE__))
credentials = YAML.load_file(File.expand_path('../credentials.yaml', __FILE__))
config.endpoint = credentials['endpoint']
config.username = credentials['username']
config.password = credentials['password']
- rescue
+ else
config.endpoint = 'https://sandbox-rest.avatax.com'
config.username = ENV['SANDBOX_USERNAME']
config.password = ENV['SANDBOX_PASSWORD']
end
end