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

Version Path
hashrocket-validatable-1.7.2 test/test_helper.rb
hashrocket-validatable-1.7.4 test/test_helper.rb
jnunemaker-validatable-1.7.0 test/test_helper.rb
jnunemaker-validatable-1.7.1 test/test_helper.rb
jnunemaker-validatable-1.7.2 test/test_helper.rb
vizjerai-validatable-1.8.0 test/test_helper.rb
vizjerai-validatable-1.9.0 test/test_helper.rb
durran-validatable-2.0.1 test/test_helper.rb
durran-validatable-2.0.0 test/test_helper.rb
durran-validatable-1.8.4 test/test_helper.rb
durran-validatable-1.8.3 test/test_helper.rb
durran-validatable-1.8.2 test/test_helper.rb
durran-validatable-1.8.1 test/test_helper.rb
durran-validatable-1.8.0 test/test_helper.rb
durran-validatable-1.7.5 test/test_helper.rb
jnunemaker-validatable-1.7.4 test/test_helper.rb
jnunemaker-validatable-1.7.3 test/test_helper.rb
mack-notifier-0.8.2 lib/gems/validatable-1.6.7/test/test_helper.rb
mack-notifier-0.8.3 lib/gems/validatable-1.6.7/test/test_helper.rb
mack-notifier-0.8.3.1 lib/gems/validatable-1.6.7/test/test_helper.rb