Changeset 287
- Timestamp:
- 11/26/07 21:02:47 (11 months ago)
- Files:
-
- trunk/demo/test/smoke/drb_smoke_test.rb (modified) (4 diffs)
- trunk/demo/test/unit/content_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/demo/test/smoke/drb_smoke_test.rb
r285 r287 1 1 require 'rubygems' 2 require 'benchmark' 2 3 require 'gruff' 3 4 … … 83 84 def get_time 84 85 ((Time.now - START_TIME)*1000).to_i 85 end86 87 def benchmark88 t = Time.now89 yield90 Time.now - t91 86 end 92 87 … … 133 128 134 129 def create_record(i) 135 time = benchmarkdo130 time = Benchmark.realtime do 136 131 Content.create! :title => "record #{@id} / #{i}", :description => DrbSmokeTest::random_document 137 132 end … … 161 156 result = nil 162 157 query = "findme OR #{WORDS.random_word}" 163 time = benchmarkdo158 time = Benchmark.realtime do 164 159 result = Content.find_id_by_contents query 165 160 end trunk/demo/test/unit/content_test.rb
r272 r287 28 28 end 29 29 30 def test_limit_all 31 res = Content.find_by_contents '*', { :limit => :all }, :conditions => ['lower(title) like ?', 'content'], :order => 'contents.description' 32 end 33 30 34 def test_find_with_ferret_on_has_many_assoc 31 35 c = contents(:first)
