Sha256: 2225d47b35650e4bccfc8c0088548144cc2144da80c8c669d9a381ec9ac38d9a

Contents?: true

Size: 576 Bytes

Versions: 14

Compression:

Stored size: 576 Bytes

Contents

require 'rubygems'
require 'test/unit'
#require 'shoulda'
require 'mocha'
require File.dirname(__FILE__) + '/../lib/carrot'

class << Test::Unit::TestCase
  def test(name, &block)
    test_name = "test_#{name.gsub(/[\s\W]/,'_')}"
    raise ArgumentError, "#{test_name} is already defined" if self.instance_methods.include? test_name
    define_method test_name, &block
  end

  def xtest(name, &block)
    # no-op, an empty test method is defined to prevent "no tests in testcase" errors when all tests are disabled
    define_method(:test_disabled) { assert true }
  end
end

Version data entries

14 entries across 14 versions & 6 rubygems

Version Path
cwyckoff-carrot-0.6.2 test/test_helper.rb
famoseagle-carrot-0.1.0 test/test_helper.rb
famoseagle-carrot-0.2.0 test/test_helper.rb
famoseagle-carrot-0.3.0 test/test_helper.rb
famoseagle-carrot-0.4.0 test/test_helper.rb
famoseagle-carrot-0.5.0 test/test_helper.rb
famoseagle-carrot-0.6.0 test/test_helper.rb
famoseagle-carrot-0.7.0 test/test_helper.rb
maxlapshin-carrot-0.6.0 test/test_helper.rb
carrot-0.8.1 test/test_helper.rb
secure_carrot-0.1.0 test/test_helper.rb
carrot-0.8.0 test/test_helper.rb
sa-carrot-0.7.1 test/test_helper.rb
carrot-0.7.0 test/test_helper.rb