Sha256: b1e4a32cc973373f24a7dec0a69d0e59cb178dc233a292e0fe7f19f6f4b1f72f

Contents?: true

Size: 471 Bytes

Versions: 10

Compression:

Stored size: 471 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
    # silence STDOUT
    current_stdout = $stdout.dup
    $stdout = File.new('/dev/null', 'w')
    load Ardb.config.schema_path
    $stdout = current_stdout
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ardb-0.9.0 lib/ardb/test_helpers.rb
ardb-0.8.0 lib/ardb/test_helpers.rb
ardb-0.7.0 lib/ardb/test_helpers.rb
ardb-0.6.0 lib/ardb/test_helpers.rb
ardb-0.5.0 lib/ardb/test_helpers.rb
ardb-0.4.1 lib/ardb/test_helpers.rb
ardb-0.4.0 lib/ardb/test_helpers.rb
ardb-0.3.0 lib/ardb/test_helpers.rb
ardb-0.2.0 lib/ardb/test_helpers.rb
ardb-0.1.0 lib/ardb/test_helpers.rb