From: fkocherga Date: 2009-12-30T14:36:42+09:00 Subject: Re: Using #include at the instance level? > All I am trying to do is emulate test/unit but using a DSL. > Essentially: > > class MyTest < Test::Unit::TestCase > > include M > > def test_N_n1 > assert_equal(N.n1, "n1") > end > > end > > Becomes: > > testcase :MyTest do > > include M > > testunit :N_n1 do > assert_equal(N.n1, "n1") > end > > end > Not sure why you need a DSL for, but technically it is doable (in Ruby 1.9.1): http://gist.github.com/265864 -- Fedor Kocherga http://sidenotes.kocherga.info/