Sha256: 1268983652f94299dd57b5e35b55eb3184a891cac9596b84ba3db8a5e747577c
Contents?: true
Size: 849 Bytes
Versions: 5
Compression:
Stored size: 849 Bytes
Contents
require 'rubygems' # Testing dependencies require 'test/unit' require 'shoulda' # RedGreen doesn't seem to be needed under 1.9 require 'redgreen' if RUBY_VERSION < "1.9" require 'pathname' root_directory = Pathname.new(__FILE__).dirname.join("..").expand_path require root_directory.join("lib", "bird_grinder") class Test::Unit::TestCase protected # Short hand for creating a class with # a given class_eval block. def class_via(*args, &blk) klass = Class.new(*args) klass.class_eval(&blk) unless blk.blank? return klass end # Short hand for creating a test class # for a set of mixins - give it the modules # and it will include them all. def test_class_for(*mods, &blk) klass = Class.new klass.class_eval { include(*mods) } klass.class_eval(&blk) unless blk.blank? return klass end end
Version data entries
5 entries across 5 versions & 1 rubygems