Sha256: 2b83b30f897268d66d9afa565bd3696827aab3a133ddb73da74eca743bdd1381
Contents?: true
Size: 436 Bytes
Versions: 3
Compression:
Stored size: 436 Bytes
Contents
module Minitest class Test def self.test(name, &block) test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym defined = method_defined? test_name 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
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
minitest-utils-0.1.4 | lib/minitest/utils/extension.rb |
minitest-utils-0.1.3 | lib/minitest/utils/extension.rb |
minitest-utils-0.1.2 | lib/minitest/utils/extension.rb |