require File.join(File.dirname(__FILE__), 'CONFIG.rb') require 'test/unit' require 'rubygems' require 'og' class TC_Loop < Test::Unit::TestCase class ManagedClass attr_accessor :thing, String validate_unique :thing end $og1.manage_class ManagedClass def setup @thing_1 = ManagedClass.new @thing_1.thing = 'thing' @thing_1.save end def teardown ManagedClass.delete_all end def test_loop thing_2 = ManagedClass.new thing_2.thing = @thing_1.thing thing_2.valid? assert thing_2.errors end end