Sha256: 7e0a3b49b32440c0da17cb8ad45cac01f0e65dab624ca87a6eba2f9f527a6982

Contents?: true

Size: 968 Bytes

Versions: 57

Compression:

Stored size: 968 Bytes

Contents

require "rubygems"
require "vcr"
require "support/fixnum_extension"

module Gem
  def self.win_platform?() false end
end unless defined?(Gem)

# pretend we're always on the internet (so that we don't have an
# internet connection dependency for our cukes)
VCR::InternetConnection.class_eval do
  def available?; true; end
end

if ENV['DATE_STRING']
  require 'timecop'
  Timecop.travel(Date.parse(ENV['DATE_STRING']))
end

def include_http_adapter_for(lib)
  require((lib =~ /faraday/) ? 'faraday' : lib)
  require 'typhoeus' if lib.include?('typhoeus') # for faraday-typhoeus
  require 'support/http_library_adapters'
  include HTTP_LIBRARY_ADAPTERS[lib]
end

def response_body_for(*args)
  get_body_string(make_http_request(*args))
end

def start_sinatra_app(&block)
  require 'sinatra/base'
  require 'support/vcr_localhost_server'
  klass = Class.new(Sinatra::Base)
  klass.disable :protection
  klass.class_eval(&block)

  VCR::LocalhostServer.new(klass.new)
end

Version data entries

57 entries across 57 versions & 6 rubygems

Version Path
cloudsmith-api-2.0.16 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.15 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.14 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.13 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.12 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.11 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.10 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.9 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.8 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.7 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.6 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.5 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.4 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.2 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.1 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-2.0.0 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-1.142.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-1.120.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb
cloudsmith-api-1.61.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/spec/support/cucumber_helpers.rb