Sha256: 68d433b1dea2f62c29fdf9134a93403bfbd702c727455cd88957c37c23a746a5

Contents?: true

Size: 453 Bytes

Versions: 57

Compression:

Stored size: 453 Bytes

Contents

if defined? JRUBY_VERSION
  USING_JRUBY = true
else
  USING_JRUBY = false
end

if USING_JRUBY
  SEQUEL_TEST_DB_URI = "jdbc:sqlite::memory:"
else
  SEQUEL_TEST_DB_URI = "sqlite::memory"
end

DB = Sequel.connect(SEQUEL_TEST_DB_URI)

def seed(db = DB)
  db.run("CREATE TABLE users (id INTEGER PRIMARY KEY, name STRING)")

  db[:users].insert(id: 1, name: 'Jane')
  db[:users].insert(id: 2, name: 'Joe')
end

def deseed(db = DB)
  db.drop_table? :users
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
rom-sql-3.1.0 lib/rom/sql/spec/support.rb
rom-sql-3.0.1 lib/rom/sql/spec/support.rb
rom-sql-3.0.0 lib/rom/sql/spec/support.rb
rom-sql-2.5.0 lib/rom/sql/spec/support.rb
rom-sql-2.4.0 lib/rom/sql/spec/support.rb
rom-sql-2.3.0 lib/rom/sql/spec/support.rb
rom-sql-2.2.1 lib/rom/sql/spec/support.rb
rom-sql-2.2.0 lib/rom/sql/spec/support.rb
rom-sql-2.1.0 lib/rom/sql/spec/support.rb
rom-sql-2.0.0 lib/rom/sql/spec/support.rb
rom-sql-1.3.5 lib/rom/sql/spec/support.rb
rom-sql-2.0.0.rc1 lib/rom/sql/spec/support.rb
rom-sql-1.3.4 lib/rom/sql/spec/support.rb
rom-sql-2.0.0.beta3 lib/rom/sql/spec/support.rb
rom-sql-2.0.0.beta2 lib/rom/sql/spec/support.rb
rom-sql-2.0.0.beta1 lib/rom/sql/spec/support.rb
rom-sql-1.3.3 lib/rom/sql/spec/support.rb
rom-sql-1.3.2 lib/rom/sql/spec/support.rb
rom-sql-1.3.1 lib/rom/sql/spec/support.rb
rom-sql-1.3.0 lib/rom/sql/spec/support.rb