Sha256: 2899e71ef6b3cdf53953d2683050a79b158d3317d4715e0b77b11bc08203b560
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
require 'helper' require 'sqlite3' db_path = File.expand_path('../../tmp/test.sqlite3', __FILE__) FileUtils.mkdir_p File.dirname(db_path) FileUtils.rm_f db_path ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => db_path describe "upserting on sqlite" do before do @opened_connections = [] ActiveRecord::Base.connection.drop_table(Pet.table_name) rescue nil Pet.auto_upgrade! # @connection = new_connection end # after do # @opened_connections.each { |c| c.close } # end # def new_connection # c = SQLite3::Database.open(File.expand_path('../../tmp/test.sqlite3', __FILE__)) # @opened_connections << c # c # end def connection # @connection ActiveRecord::Base.connection end it_also 'is a database with an upsert trick' it_also 'is just as correct as other ways' it_also 'can be speeded up with upserting' it_also 'supports multibyte' it_also 'is thread-safe' it_also "doesn't mess with timezones" it_also 'supports binary upserts' # it_also "doesn't blow up on reserved words" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
upsert-0.2.1 | test/test_sqlite.rb |
upsert-0.2.0 | test/test_sqlite.rb |