Sha256: c09d5416732321cec706820d1d1843e6d937100448f8bf821d582c86145f5484

Contents?: true

Size: 1.9 KB

Versions: 2

Compression:

Stored size: 1.9 KB

Contents

# frozen_string_literal: true

require 'pry'
require 'rack/test'
require 'faker'
require 'json'
require 'minty'

if RUBY_VERSION >= '2.7.2'
  # NOTE: https://bugs.ruby-lang.org/issues/17000
  Warning[:deprecated] = true
end

require 'simplecov'
SimpleCov.start

if ENV['CI'] == 'true'
  require 'simplecov-cobertura'
  SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
end

require 'dotenv'
Dotenv.load

require 'webmock/rspec'
WebMock.allow_net_connect!

require 'vcr'
VCR.configure do |config|
  # Uncomment the line below to record new VCR cassettes.
  # When this is commented out, VCR will reject all outbound HTTP calls.
  config.allow_http_connections_when_no_cassette = true
  config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
  config.configure_rspec_metadata!
  config.hook_into :webmock
  config.filter_sensitive_data('CLIENT_SECRET') { ENV['CLIENT_SECRET'] }
  config.filter_sensitive_data('API_TOKEN') { ENV['MASTER_JWT'] }

  ENV['DOMAIN'] = 'minty-sdk-tests.minty.page'
  ENV['CLIENT_ID'] = '2cnWuug6zaFX1j0ge1P99jAUn0F4XSuI'
end

$LOAD_PATH.unshift File.expand_path(__dir__)
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)

Dir['./lib/*.rb'].sort.each { |f| require f }
Dir['./lib/api/**/*.rb'].sort.each { |f| require f }
Dir['./spec/support/**/*.rb'].sort.each { |f| require f }
Dir['./spec/support/*.rb'].sort.each { |f| require f }

require 'rspec'
RSpec.configure do |config|
  config.filter_run focus: true
  config.run_all_when_everything_filtered = true
  config.include Credentials

  config.expect_with :rspec do |c|
    c.max_formatted_output_length = 1_000_000
  end
end

def wait(time, increment = 5, elapsed_time = 0, &block)
  yield
rescue RSpec::Expectations::ExpectationNotMetError => e
  raise e if elapsed_time >= time

  sleep increment
  wait(time, increment, elapsed_time + increment, &block)
end

def entity_suffix
  'rubytest-210908'
end

puts "Entity suffix is #{entity_suffix}"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
minty-1.0.1 spec/spec_helper.rb
minty-1.0.0 spec/spec_helper.rb