Sha256: d68be0b5d598f80592888fd43d7736e704d1feb8411cb7471fd7d902bb619dfb

Contents?: true

Size: 844 Bytes

Versions: 1

Compression:

Stored size: 844 Bytes

Contents

require 'mavenlink'
require 'shoulda/matchers/active_model'
require 'awesome_print'
require 'support/shared_examples'

shared_context 'stubbed requests', stub_requests: true do
  let(:stubbed_requests) do
    Faraday::Adapter::Test::Stubs.new
  end

  before do
    Mavenlink.oauth_token = 'token'
    Mavenlink.adapter = [:test, stubbed_requests]
  end

  def stub_request(request_type, path, response)
    stubbed_requests.public_send(request_type, path) { [200, {}, response.to_json] }
  end
end

Mavenlink.perform_validations = true
Mavenlink.logger = Mavenlink::Logger.new(STDOUT)
Mavenlink.logger.level = Logger::INFO

RSpec.configure do |config|
  config.mock_with :rspec
  config.color_enabled = true
  config.formatter = :documentation
  config.include Shoulda::Matchers::ActiveModel
  config.extend Shoulda::Matchers::ActiveModel
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mavenlink-0.0.1 spec/spec_helper.rb