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

Version Path
xmysql2psql-0.2.1 test/lib/ext_test_unit.rb
xmysql2psql-0.2.0 test/lib/ext_test_unit.rb
Empact-authlogic_rpx-2.0.0 test/libs/ext_test_unit.rb
slayer-authlogic_rpx-1.2.2 test/libs/ext_test_unit.rb
slayer-authlogic_rpx-1.2.1 test/libs/ext_test_unit.rb
mysql2psql-0.1.0 test/lib/ext_test_unit.rb
authlogic_rpx-1.2.0 test/libs/ext_test_unit.rb
Empact-authlogic_rpx-1.1.8 test/libs/ext_test_unit.rb
Empact-authlogic_rpx-1.1.7 test/libs/ext_test_unit.rb
Empact-authlogic_rpx-1.1.6 test/libs/ext_test_unit.rb
Empact-authlogic_rpx-1.1.5 test/libs/ext_test_unit.rb
Empact-authlogic_rpx-1.1.4 test/libs/ext_test_unit.rb
Empact-authlogic_rpx-1.1.3 test/libs/ext_test_unit.rb
Empact-authlogic_rpx-1.1.2 test/libs/ext_test_unit.rb