Sha256: 1e0e6eff3c099a937db63a359eebcb35b2dd0fbf42816be326fe75d4fcf363c7
Contents?: true
Size: 651 Bytes
Versions: 7
Compression:
Stored size: 651 Bytes
Contents
require 'test/unit' require_relative '../../lib/array_logic' module ArrayLogic class TestCase < Test::Unit::TestCase def self.things @things ||= Thing.make(10) end def get_things(thing_ids) @things = thing_ids.collect{|id| self.class.things[id]} end def assert_thing_match(thing_ids, rule) get_things(thing_ids) assert(rule.match(@things), "#{thing_ids.inspect} should match '#{rule.rule}'") end def assert_no_thing_match(thing_ids, rule) get_things(thing_ids) assert(!rule.match(@things), "#{thing_ids.inspect} should not match '#{rule.rule}'") end end end
Version data entries
7 entries across 7 versions & 1 rubygems