Sha256: 19abb1814fc3bea35f902a7d81be5f5c64a1a1d7f50cc0458241942886abbdeb
Contents?: true
Size: 442 Bytes
Versions: 48
Compression:
Stored size: 442 Bytes
Contents
require 'test/unit' class Test::Unit::TestCase def self.test(name, &block) test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym defined = instance_method(test_name) rescue false raise "#{test_name} is already defined in #{self}" if defined if block_given? define_method(test_name, &block) else define_method(test_name) do flunk "No implementation provided for #{name}" end end end end
Version data entries
48 entries across 48 versions & 3 rubygems