Sha256: 3338df5104fec1acf0b7b321a1275b9fa04ce9e21581262e4b79a9317711a295
Contents?: true
Size: 708 Bytes
Versions: 3
Compression:
Stored size: 708 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # # for lib/facets/overload.rb # # Extracted Mon Sep 03 16:23:07 -0700 2007 # w/ Test Extraction Ratchet # require 'facets/overload.rb' require 'test/unit' class TCOverload < Test::Unit::TestCase class X def x "hello" end overload :x, Integer do |i| i end overload :x, String, String do |s1, s2| [s1, s2] end end def setup @x = X.new end def test_x assert_equal( "hello", @x.x ) end def test_i assert_equal( 1, @x.x(1) ) end def test_s assert_equal( ["a","b"], @x.x("a","b") ) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-2.0.0 | test/unit/test_overload.rb |
facets-2.0.1 | test/unit/test_overload.rb |
facets-2.0.2 | test/unit/test_overload.rb |