Sha256: a1a45c215f6945ed349fbf16d253f35ba5e7e03368f1e201afcc544decba52af
Contents?: true
Size: 521 Bytes
Versions: 3
Compression:
Stored size: 521 Bytes
Contents
require 'integration_test_helper.rb' require 'benchmark' class RecordRemovalPerformanceTest < ActiveSupport::TestCase fixtures :posts def teardown # need to do this to work with the :if Proc tests. Post.acts_as_indexed :fields => [:title, :body] destroy_index end def test_removal iterations = 200 puts "Record removal (x #{ iterations })" (iterations - Post.count).times do posts(:wikipedia_article_1).dup.save end puts Benchmark.measure { Post.destroy_all } end end
Version data entries
3 entries across 3 versions & 1 rubygems