Sha256: 00070714a964ba1e76c7ee6a0b97788b7f7925fb3320407c921f8c8d30c71f39
Contents?: true
Size: 766 Bytes
Versions: 21
Compression:
Stored size: 766 Bytes
Contents
require 'test/unit' require 'rubygems' require 'mocha' require 'dust' require 'set' require 'expectations' require File.dirname(__FILE__) + '/../lib/validatable' class << Test::Unit::TestCase def expect(expected_value, &block) define_method :"test_#{caller.first.split("/").last}" do begin assert_equal expected_value, instance_eval(&block) rescue Exception => ex raise ex unless expected_value.is_a?(Class) && ex.is_a?(expected_value) assert_equal expected_value, ex.class end end end end class Test::Unit::TestCase def assert_array_equal a, b assert_equal Set.new(a), Set.new(b) end end class Array def to_blank_options_hash self.inject({}) {|hash, value| hash[value] = nil; hash } end end
Version data entries
21 entries across 21 versions & 6 rubygems