To edit pages or tickets please login with username/password: aaf/aaf

Changeset 287

Show
Ignore:
Timestamp:
11/26/07 21:02:47 (11 months ago)
Author:
jk
Message:

fix :limit => :all bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/demo/test/smoke/drb_smoke_test.rb

    r285 r287  
    11require 'rubygems' 
     2require 'benchmark' 
    23require 'gruff' 
    34 
     
    8384    def get_time 
    8485      ((Time.now - START_TIME)*1000).to_i 
    85     end 
    86  
    87     def benchmark 
    88       t = Time.now 
    89       yield 
    90       Time.now - t 
    9186    end 
    9287 
     
    133128 
    134129    def create_record(i) 
    135       time = benchmark do 
     130      time = Benchmark.realtime do 
    136131        Content.create! :title => "record #{@id} / #{i}", :description => DrbSmokeTest::random_document 
    137132      end 
     
    161156      result = nil 
    162157      query = "findme OR #{WORDS.random_word}" 
    163       time = benchmark do 
     158      time = Benchmark.realtime do 
    164159        result = Content.find_id_by_contents query 
    165160      end 
  • trunk/demo/test/unit/content_test.rb

    r272 r287  
    2828  end 
    2929 
     30  def test_limit_all 
     31    res = Content.find_by_contents '*', { :limit => :all }, :conditions => ['lower(title) like ?', 'content'], :order => 'contents.description' 
     32  end 
     33 
    3034  def test_find_with_ferret_on_has_many_assoc 
    3135    c = contents(:first) 

To edit pages or tickets please login with username/password: aaf/aaf