Top Level Namespace
Defined Under Namespace
Modules: ROM
Constant Summary collapse
- USING_JRUBY =
false
- SEQUEL_TEST_DB_URI =
'sqlite::memory'
- DB =
Sequel.connect(SEQUEL_TEST_DB_URI)
Instance Method Summary collapse
Instance Method Details
#deseed(db = DB) ⇒ Object
24 25 26 |
# File 'lib/rom/sql/spec/support.rb', line 24 def deseed(db = DB) db.drop_table? :users end |
#seed(db = DB) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rom/sql/spec/support.rb', line 17 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 |