test/og/mixin/tc_timestamped.rb in og-0.20.0 vs test/og/mixin/tc_timestamped.rb in og-0.21.0
- old
+ new
@@ -5,34 +5,34 @@
require 'og'
require 'og/mixin/timestamped'
$og = Og.setup(
- :store => 'psql',
- :name => 'test',
- :user => 'postgres',
- :password => 'navelrulez',
- :destroy => true
+ :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
+ class Article
+ include Og::Timestamped
+ property :body, String
- def initialize(body = nil)
- @body = body
- end
- end
+ def initialize(body = nil)
+ @body = body
+ end
+ end
- def test_all
- $og.manage_classes
+ def test_all
+ $og.manage_classes
- a = Article.create('article')
- a.save
+ a = Article.create('article')
+ a.save
- a = Article[1]
- assert a.create_time
- end
+ a = Article[1]
+ assert a.create_time
+ end
end