require 'test/unit' require 'test/unit/assertions' require 'mega/orm_support' require 'glue' require 'glue/fixture' require 'og' require 'og/test/assertions' module Test::Unit class TestCase # Include fixtures in this test case. #-- # gmosx: this method should probably be moved to glue. #++ def fixture(*classes) for klass in classes f = Fixture.new(klass) instance_variable_set "@#{klass.to_s.demodulize.underscore.pluralize}", f Fixtures[klass] = f # create variables for the fixture objects. for name, obj in f instance_variable_set "@#{name}", obj end end end # Include fixtures in this test case, and serialize them in # the active Og store. def og_fixture(*classes) fixture(*classes) for klass in classes f = Fixtures[klass] for obj in f.objects obj.save end end end end end # * George Moschovitis