Sha256: bff42ce0c2ae1940da62b3dd7ad6bc1e2db5afc96616510ae4535ea5db5e19e7
Contents?: true
Size: 583 Bytes
Versions: 3
Compression:
Stored size: 583 Bytes
Contents
require 'rubygems' require 'test/unit' #require 'shoulda' require 'mocha' require File.dirname(__FILE__) + '/../lib/secure_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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
secure_carrot-0.2.0 | test/test_helper.rb |
secure_carrot-0.1.2 | test/test_helper.rb |
secure_carrot-0.1.1 | test/test_helper.rb |