Sha256: b8d22cf6d36ffad8b0c26c45aed5080470f96f3cbb005b6ca4275d684278b70d

Contents?: true

Size: 714 Bytes

Versions: 6

Compression:

Stored size: 714 Bytes

Contents

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

require 'rubygems'
require 'test/unit'

require 'og'
  
class TC_ResolveOptions < Test::Unit::TestCase # :nodoc: all

  class User
    property :name, String
    property :age, Fixnum
  end

  $og1.manage_classes(User)

  def test_all
    User.create_with :name => 'George', :age => 30
    User.create_with :name => 'Gogo', :age => 10
    User.create_with :name => 'Stella'
    
    users = User.find [ "name LIKE ? AND age > ?", 'G%', 4 ]
    assert_equal 2, users.size

    users = User.find [ "name LIKE ? AND age > ?", 'G%', 14 ]
    assert_equal 1, users.size
    
    User.find "name LIKE 'G%' LIMIT 1"
    assert_equal 1, users.size     
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
og-0.41.0 test/og/tc_resolve.rb
og-0.28.0 test/og/tc_resolve.rb
og-0.29.0 test/og/tc_resolve.rb
og-0.30.0 test/og/tc_resolve.rb
og-0.31.0 test/og/tc_resolve.rb
og-0.40.0 test/og/tc_resolve.rb