Sha256: d5ea58c99cbbdf6025033a4ef13bfc025a9432f297dde4233b90deb0df1d245e

Contents?: true

Size: 804 Bytes

Versions: 8

Compression:

Stored size: 804 Bytes

Contents

require 'spec_helper'

describe VCR::HttpStubbingAdapters::Typhoeus, :without_monkey_patches => :vcr do
  before(:each) do
    ::Typhoeus::Hydra.stubs = []
    ::Typhoeus::Hydra.allow_net_connect = true
  end

  it_behaves_like 'an http stubbing adapter', ['typhoeus'], [:method, :uri, :host, :path, :body, :headers]

  it_performs('version checking',
    :valid    => %w[ 0.2.1 0.2.99 ],
    :too_low  => %w[ 0.1.0 0.1.31 0.2.0 ],
    :too_high => %w[ 0.3.0 1.0.0 ]
  ) do
    before(:each) { @orig_version = Typhoeus::VERSION }
    after(:each)  { Typhoeus::VERSION = @orig_version }

    # Cannot be regular method def as that raises a "dynamic constant assignment" error
    define_method :stub_version do |version|
      Typhoeus::VERSION = version
    end
  end
end unless RUBY_PLATFORM == 'java'

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vcr-1.10.3 spec/vcr/http_stubbing_adapters/typhoeus_spec.rb
vcr-1.10.2 spec/vcr/http_stubbing_adapters/typhoeus_spec.rb
vcr-1.10.0 spec/vcr/http_stubbing_adapters/typhoeus_spec.rb
vcr-1.9.0 spec/vcr/http_stubbing_adapters/typhoeus_spec.rb
vcr-1.8.0 spec/vcr/http_stubbing_adapters/typhoeus_spec.rb
vcr-1.7.2 spec/vcr/http_stubbing_adapters/typhoeus_spec.rb
vcr-1.7.1 spec/vcr/http_stubbing_adapters/typhoeus_spec.rb
vcr-1.7.0 spec/vcr/http_stubbing_adapters/typhoeus_spec.rb