Sha256: 233446a898a903951a49e1a3df520347c111dce03f6defea06dcf0cd0f05355d

Contents?: true

Size: 917 Bytes

Versions: 1

Compression:

Stored size: 917 Bytes

Contents

require "dotenv/load"
require "webmock/rspec"
require "bundler/setup"
require "digicert"

Dir["./spec/support/**/*.rb"].sort.each { |file| require file }

RSpec.configure do |config|
  # Enable flags like --only-failures and --next-failure
  config.example_status_persistence_file_path = ".rspec_status"

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  config.before :all do
    Digicert.configure do |digicert_config|
      digicert_config.debug_mode = false
      digicert_config.api_key = ENV["SECRET_DEV_API_KEY"] || "SECRET_KEY"
    end
  end

  # Skip the actual API calls by default
  config.filter_run_excluding api_call: true

  # Allow the net_connection when we actually want to
  # perform an actual API reques
  #
  config.before :each, api_call: true do
    Digicert.configuration.debug_mode = true
    WebMock.allow_net_connect!
  end

  config.include Digicert::FakeDigicertApi
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
digicert-0.1.1 spec/spec_helper.rb