Sha256: 8eeebae66bd7b6b7e381d1591ba0b0c7512400d337487aa0bface8070866cf4e

Contents?: true

Size: 524 Bytes

Versions: 16

Compression:

Stored size: 524 Bytes

Contents

require 'active_record'
require 'ardb'

# Use theses helpers in your test suite.  They all generally assume Ardb has
# already been initialized by calling `Ardb.init`.

module Ardb; end
module Ardb::TestHelpers
  module_function

  def drop_tables
    Ardb.adapter.drop_tables
  end

  def load_schema
    Ardb.adapter.load_schema
  end

  def reset_db!
    Ardb.adapter.drop_db
    Ardb.adapter.create_db
    self.load_schema
  end

  def reset_db
    @reset_db ||= begin
      self.reset_db!
      true
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ardb-0.24.0 lib/ardb/test_helpers.rb
ardb-0.23.0 lib/ardb/test_helpers.rb
ardb-0.22.1 lib/ardb/test_helpers.rb
ardb-0.22.0 lib/ardb/test_helpers.rb
ardb-0.21.0 lib/ardb/test_helpers.rb
ardb-0.20.0 lib/ardb/test_helpers.rb
ardb-0.19.0 lib/ardb/test_helpers.rb
ardb-0.18.0 lib/ardb/test_helpers.rb
ardb-0.17.0 lib/ardb/test_helpers.rb
ardb-0.16.0 lib/ardb/test_helpers.rb
ardb-0.15.0 lib/ardb/test_helpers.rb
ardb-0.14.0 lib/ardb/test_helpers.rb
ardb-0.13.0 lib/ardb/test_helpers.rb
ardb-0.12.0 lib/ardb/test_helpers.rb
ardb-0.11.0 lib/ardb/test_helpers.rb
ardb-0.10.0 lib/ardb/test_helpers.rb