Sha256: ead223857cdd625eff483a92a8061780bfa2a6b37ad0491578e4429aedb812fa
Contents?: true
Size: 583 Bytes
Versions: 7
Compression:
Stored size: 583 Bytes
Contents
require 'test/unit' require 'pp' require 'mongo_mapper' require File.expand_path(File.dirname(__FILE__) + '/../lib/grip') MongoMapper.database = "test-attachments" class Test::Unit::TestCase def self.test(name, &block) test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym defined = instance_method(test_name) rescue false 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
Version data entries
7 entries across 7 versions & 1 rubygems