Sha256: 7b182d2eada4c36c2d6d00cc84d04af80761c5102dfd6c474e7ee49d49e48e56

Contents?: true

Size: 635 Bytes

Versions: 3

Compression:

Stored size: 635 Bytes

Contents

require 'rubygems'
require 'test/unit'

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'postgresql_cursor'

ActiveRecord::Base.establish_connection :database=>'allen_test', :adapter=>'postgresql', :username=>'allen'
class Model < ActiveRecord::Base
  set_table_name "records"

  # create table records (id serial primary key);
  def self.generate(max=1_000_000)
    max.times do
      connection.execute("insert into records values (nextval('records_id_seq'::regclass))")
    end
  end
end

Model.generate(1000) if Model.count == 0

class Test::Unit::TestCase
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
postgresql_cursor-0.3.1 test/helper.rb
postgresql_cursor-0.3.0 test/helper.rb
postgresql_cursor-0.2.0 test/helper.rb