Sha256: 3ddacd9f562bb22190a36642d1243e23e05131053ae847783c05baa9f8c58ce3

Contents?: true

Size: 830 Bytes

Versions: 5

Compression:

Stored size: 830 Bytes

Contents

require File.expand_path('../../lib/avatax', __FILE__)
require 'rspec'
require 'yaml'


AvaTax.configure do |config|
  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']
  else
    config.endpoint = 'https://sandbox-rest.avatax.com'
    config.username = ENV['SANDBOX_USERNAME']
    config.password = ENV['SANDBOX_PASSWORD']
  end
end

client = AvaTax::Client.new({ :logger => true, :log_request_and_response_info => true })
companies = client.query_companies

RSpec.configure do |config|
  config.before {
    @client = client
    @company_code = companies["value"][0]["companyCode"]
  }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
avatax-25.3.0 spec/spec_helper.rb
avatax-25.2.2 spec/spec_helper.rb
avatax-23.2.0 spec/spec_helper.rb
avatax-23.1.0 spec/spec_helper.rb
avatax-22.11.0 spec/spec_helper.rb