Sha256: 84c04ced5c9c286be1fe2c4fda22188ef96adb769a09dffe3e96b6ddb0b7f8c3

Contents?: true

Size: 430 Bytes

Versions: 7

Compression:

Stored size: 430 Bytes

Contents

require 'test/unit'
require 'pp'

TEST_FILE = File.dirname(__FILE__) + '/test.txt' unless defined?(TEST_FILE)

unless Test::Unit::TestCase.respond_to?(:test)
  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
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
wonko9-i_can_daemonize-0.0.0 test/test_helper.rb
wonko9-i_can_daemonize-0.6.0 test/test_helper.rb
wonko9-i_can_daemonize-0.7.0 test/test_helper.rb
wonko9-i_can_daemonize-0.7.1 test/test_helper.rb
wonko9-i_can_daemonize-0.7.2 test/test_helper.rb
wonko9-i_can_daemonize-0.8.0 test/test_helper.rb
sa-i_can_daemonize-0.8.0 test/test_helper.rb