Sha256: eddb9e59f0555a5e75b0ddba8034e490081103afbbbd599613d08040e3c5d507

Contents?: true

Size: 1.2 KB

Versions: 10

Compression:

Stored size: 1.2 KB

Contents

# frozen_string_literal: true
# typed: false

require 'simplecov'
SimpleCov.start

if ENV['CI'] == 'true'
  require 'codecov'
  SimpleCov.formatter = SimpleCov::Formatter::Codecov
end

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
$LOAD_PATH << File.join(File.dirname(__FILE__))

require 'rubygems'
require 'rspec'
require 'webmock/rspec'
require 'workos'
require 'vcr'

SPEC_ROOT = File.dirname __FILE__

VCR.configure do |config|
  config.cassette_library_dir = 'spec/support/fixtures/vcr_cassettes'
  config.filter_sensitive_data('<API_KEY>') { WorkOS.key }
  config.hook_into :webmock
end

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.shared_context_metadata_behavior = :apply_to_host_groups

  WebMock::API.prepend(Module.new do
    extend self

    # Disable VCR when a WebMock stub is created
    # for clearer spec failure messaging
    def stub_request(*args)
      VCR.turn_off!
      super
    end
  end)

  config.before(:all) { WorkOS.key ||= '' }
  config.before(:each) { VCR.turn_on! }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
workos-1.5.0 spec/spec_helper.rb
workos-1.4.0 spec/spec_helper.rb
workos-1.3.0 spec/spec_helper.rb
workos-1.2.1 spec/spec_helper.rb
workos-1.2.0 spec/spec_helper.rb
workos-1.1.0 spec/spec_helper.rb
workos-1.0.0 spec/spec_helper.rb
workos-0.11.2 spec/spec_helper.rb
workos-0.11.1 spec/spec_helper.rb
workos-0.11.0 spec/spec_helper.rb