Sha256: 73d145c11e452898baec17a18e98a5659fa8af7fbff1bd81cf4c536be782dda2

Contents?: true

Size: 544 Bytes

Versions: 3

Compression:

Stored size: 544 Bytes

Contents

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

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

3 entries across 3 versions & 1 rubygems

Version Path
og-0.24.0 test/og/tc_override.rb
og-0.25.0 test/og/tc_override.rb
og-0.26.0 test/og/tc_override.rb