Skip to content

Instantly share code, notes, and snippets.

@auxesis
Created February 20, 2010 19:34
Show Gist options
  • Save auxesis/13299bb24d7c998509b6 to your computer and use it in GitHub Desktop.
Save auxesis/13299bb24d7c998509b6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'net/http'
require 'test/unit'
class NetHTTPinheritsTest < Test::Unit::TestCase
def test_inherits_from_object
assert_nothing_raised do
n = Net::HTTP.new("google.co.uk", 80)
n.instance_variable_defined?(:@foo)
end
end
def test_inheritance_chain
n = Net::HTTP.new("google.co.uk", 80)
assert n.class.ancestors.include?(Object)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment