Sha256: 161292ef2a0a0f776301e990073f422fdb8dd958211ddcd99663b9a25b02b19e
Contents?: true
Size: 714 Bytes
Versions: 1
Compression:
Stored size: 714 Bytes
Contents
require File.join(File.dirname(__FILE__), 'CONFIG.rb') $DBG = true require 'test/unit' require 'og' class TC_OgFinder < Test::Unit::TestCase # :nodoc: all class User property :name, String property :age, Fixnum end def setup @og = Og.setup($og_config) end def test_all User.find_by_name('tml') User.find_by_name_and_age('tml', 3) User.find_all_by_name_and_age('tml', 3) User.find_all_by_name_and_age('tml', 3, :name_op => 'LIKE', :age_op => '>', :limit => 4) User.find_or_create_by_name_and_age('tml', 3) User.find_or_create_by_name_and_age('stella', 5) User.find_or_create_by_name_and_age('tml', 3) assert_equal 2, User.all.size end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
og-0.25.0 | test/og/tc_finder.rb |