Sha256: 3ed5fdf7267be4c9d699af5115be48919295905fdccc47d7d26bcee351987d11
Contents?: true
Size: 669 Bytes
Versions: 14
Compression:
Stored size: 669 Bytes
Contents
module Test::Unit class TestCase def self.must(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 end module Test::Unit::Assertions def assert_false(object, message="") assert_equal(false, object, message) end def assert_true(object, message="") assert_equal(true, object, message) end end
Version data entries
14 entries across 14 versions & 5 rubygems