Sha256: fbbf184ac4fcb2a0e82fee82a97c215c1972c4c9b360c77414c47d1690c57c16
Contents?: true
Size: 522 Bytes
Versions: 1
Compression:
Stored size: 522 Bytes
Contents
require 'minitest' require "minitest/autorun" require 'mocha/setup' require 'test_construct' class Minitest::Test def self.testing(name) @group = name yield @group = nil end def self.test(name, &block) name = name.strip.gsub(/\s\s+/, " ") group = "#{@group}: " if defined? @group test_name = "test_: #{group}#{name}".to_sym defined = instance_methods.include? test_name raise "#{test_name} is already defined in #{self}" if defined define_method(test_name, &block) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
test_construct-2.0.2 | test/test_helper.rb |