Sha256: 4c94fe15c1b299d793f23d85058bc612aebcc0a5b0b71a0558329807b6f4483b

Contents?: true

Size: 667 Bytes

Versions: 3

Compression:

Stored size: 667 Bytes

Contents

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

require 'rubygems'
require 'facets'
require 'test/unit'
require 'ostruct'

require 'og'
require 'glue/timestamped'

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

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

  class Article 
    is Glue::Timestamped
    property :body, String

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

  $og1.manage_classes Article

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

    a = Article[1]
    assert a.create_time
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
og-0.29.0 test/og/mixin/tc_timestamped.rb
og-0.30.0 test/og/mixin/tc_timestamped.rb
og-0.31.0 test/og/mixin/tc_timestamped.rb