Sha256: 493240d4a86cc8142e4055863a4d84289ef36ea05f519f81bd7c1af6e3229a95

Contents?: true

Size: 580 Bytes

Versions: 1

Compression:

Stored size: 580 Bytes

Contents

require File.join(File.dirname(__FILE__), 'CONFIG.rb')

require 'rubygems'
require 'facets'
require 'test/unit'
require 'og'

class Book
  property :title
  belongs_to :owner, Person # this creates a problem?
end

class Person
  property :name, Og::VarChar(128)
  has_many :books, Book, :foreign_name => :owner
end

class TestOg < Test::Unit::TestCase
  include Og

  def test_basic
    book = Book.create
    person = Person.create
    person.books << book
  end

  def setup
    Og.table_prefix = nil
    og = Og.setup($og_config)
  end
end

# * Kristof Jozsa <dyn@ond.vein.hu>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
og-0.27.0 test/og/tc_override.rb