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

Version Path
rsolr-ext-0.11.2 test/test_unit_test_case.rb
rsolr-ext-0.11.1 test/test_unit_test_case.rb
rsolr-ext-0.11.0 test/test_unit_test_case.rb
rsolr-ext-0.10.1 test/test_unit_test_case.rb
rsolr-ext-0.10.0 test/test_unit_test_case.rb
rsolr-ext-0.9.6.5 test/test_unit_test_case.rb
rsolr-ext-0.9.6.4 test/test_unit_test_case.rb
rsolr-ext-0.9.6.3 test/test_unit_test_case.rb