Sha256: 5d8004b06479cf87c1c744c84a1b9b3cb434b454ac01ad262489ec49813aecf8
Contents?: true
Size: 999 Bytes
Versions: 10
Compression:
Stored size: 999 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # # for lib/facets/module/clone.rb # # Extracted Mon Sep 03 16:23:07 -0700 2007 # w/ Test Extraction Ratchet # require 'facets/module/clone.rb' require 'test/unit' class TestModuleClone < Test::Unit::TestCase module M def f; 1; end def g; 2; end end class Remove include M.clone_removing( :g ) end class Rename include M.clone_renaming( :q => :g ) end class Use include M.clone_using( :f ) end def test_removing assert( Remove.method_defined?(:f) ) assert( ! Remove.method_defined?(:g) ) end def test_renaming assert( ! Rename.method_defined?(:g) ) assert( Rename.method_defined?(:f) ) assert( Rename.method_defined?(:q) ) end def test_using_2 assert( ! Use.method_defined?(:g) ) assert( Use.method_defined?(:f) ) end end
Version data entries
10 entries across 10 versions & 1 rubygems