Sha256: 416bbca7436b2b9694e61fa1c8cc44cece62c7fbf4779fc3ee11f5fc5fa4f11c

Contents?: true

Size: 626 Bytes

Versions: 4

Compression:

Stored size: 626 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')

require 'test/unit'
require 'ostruct'

require 'og'
require 'og/mixin/timestamped'

$og = Og.setup(
  :store => 'psql',
  :name => 'test',
  :user => 'postgres',
  :password => 'navelrulez',
  :destroy => true
)

class TestCaseOgTimestamped < Test::Unit::TestCase # :nodoc: all

  class Article 
    include Og::Timestamped
    property :body, String

    def initialize(body = nil)
      @body = body
    end
  end

  def test_all
    $og.manage_classes    

    a = Article.create('article')
    a.save

    a = Article[1]
    assert a.create_time
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
og-0.21.0 test/og/mixin/tc_timestamped.rb
og-0.21.2 test/og/mixin/tc_timestamped.rb
og-0.22.0 test/og/mixin/tc_timestamped.rb
og-0.23.0 test/og/mixin/tc_timestamped.rb