Sha256: 6bf0f5bc055bf7a6f9371351949fd03c1cef60819aac1df6267bd878a1609668

Contents?: true

Size: 1.33 KB

Versions: 2

Compression:

Stored size: 1.33 KB

Contents

if ENV["CODECLIMATE_REPO_TOKEN"]
  require "codeclimate-test-reporter"
  CodeClimate::TestReporter.start
else
  require "simplecov"
  SimpleCov.start
end

require "celsius/primo"
require "vcr"
require "yaml"

begin
  require "pry"
rescue LoadError
end

# disable HTTPI loggin (noise)
HTTPI.log = false

RSpec.configure do |config|
  # begin --- rspec 3.1 generator
  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
  # end --- rspec 3.1 generator
end

VCR.configure do |c|
  c.allow_http_connections_when_no_cassette = true
  c.cassette_library_dir = "spec/cassettes"
  c.default_cassette_options = {
    match_requests_on: [:method, :uri, :query, :body],
    decode_compressed_response: true
  }
  c.hook_into :webmock

  # https://groups.google.com/forum/#!topic/vcr-ruby/2sKrJa86ktU
  c.before_record do |interaction|
    if interaction.response.body.encoding.name == "ASCII-8BIT"
      interaction.response.body.force_encoding("UTF-8")
    end
  end

  # https://relishapp.com/vcr/vcr/v/2-9-3/docs/test-frameworks/usage-with-rspec-metadata
  c.configure_rspec_metadata!
end

def read_asset(path_to_file)
  File.read(File.expand_path(File.join(File.dirname(__FILE__), "assets", path_to_file)))
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
celsius-primo-0.1.4 spec/spec_helper.rb
celsius-primo-0.1.3 spec/spec_helper.rb