Sha256: 34995b2c071e22d447ade41fd4ba9cb360f34d46b44c4aa6c4e4eca6951d3ffe

Contents?: true

Size: 618 Bytes

Versions: 44

Compression:

Stored size: 618 Bytes

Contents

require File.join(File.dirname(__FILE__), "test_helper")

class TestMissingOpenURI < Test::Unit::TestCase

  def setup
    super
    @saved_open_uri = OpenURI
    Object.send(:remove_const, :OpenURI)
  end

  def teardown
    super
    Object.const_set(:OpenURI, @saved_open_uri)
  end


  def test_register_using_exception_without_open_uri
    # regression test for Responder needing OpenURI::HTTPError to be defined
    FakeWeb.register_uri(:get, "http://example.com/", :exception => StandardError)
    assert_raises(StandardError) do
      Net::HTTP.start("example.com") { |http| http.get("/") }
    end
  end

end

Version data entries

44 entries across 44 versions & 8 rubygems

Version Path
auser-poolparty-1.3.0 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.1 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.10 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.11 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.12 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.13 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.14 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.15 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.16 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.17 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.2 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.3 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.4 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.5 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.6 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.7 vendor/gems/fakeweb/test/test_missing_open_uri.rb
auser-poolparty-1.3.8 vendor/gems/fakeweb/test/test_missing_open_uri.rb
benschwarz-smoke-0.5.0 vendor/fakeweb/test/test_missing_open_uri.rb
benschwarz-smoke-0.5.1 vendor/fakeweb/test/test_missing_open_uri.rb
benschwarz-smoke-0.5.2 vendor/fakeweb-1.2.5/test/test_missing_open_uri.rb