Sha256: cf91eda2813f2609c7af5399837f827c4903a47514e4ea353a7af6ad017f22c5

Contents?: true

Size: 602 Bytes

Versions: 6

Compression:

Stored size: 602 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe WebMock::HttpLibAdapterRegistry do
  describe "each_adapter" do
    it "should yield block over each adapter" do
      class MyAdapter < WebMock::HttpLibAdapter; end
      WebMock::HttpLibAdapterRegistry.instance.register(:my_lib, MyAdapter)
      adapters = []
      WebMock::HttpLibAdapterRegistry.instance.each_adapter {|n,a|
        adapters << [n, a]
      }
      adapters.should include([:my_lib, MyAdapter])
      WebMock::HttpLibAdapterRegistry.instance.
        http_lib_adapters.delete(:my_lib)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
webmock-1.7.5 spec/http_lib_adapters/http_lib_adapter_registry_spec.rb
webmock-1.7.4 spec/http_lib_adapters/http_lib_adapter_registry_spec.rb
webmock-1.7.3 spec/http_lib_adapters/http_lib_adapter_registry_spec.rb
webmock-1.7.2 spec/http_lib_adapters/http_lib_adapter_registry_spec.rb
webmock-1.7.1 spec/http_lib_adapters/http_lib_adapter_registry_spec.rb
webmock-1.7.0 spec/http_lib_adapters/http_lib_adapter_registry_spec.rb