Sha256: 253f8b9de4506e1c2256fe20510fc814d3f39d3b9ef6fb1761caa432565c180c

Contents?: true

Size: 471 Bytes

Versions: 17

Compression:

Stored size: 471 Bytes

Contents

Bundler.require :hstore
Superstore::Base.config = {'adapter' => 'hstore'}

class HstoreInitializer
  def self.initialize!
    Superstore::Base.adapter.create_table('issues')
  end

  def self.table_names
    %w(issues)
  end
end

HstoreInitializer.initialize!

module ActiveSupport
  class TestCase
    teardown do
      HstoreInitializer.table_names.each do |table_name|
        ActiveRecord::Base.connection.execute "TRUNCATE #{table_name}"
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
superstore-1.2.0 test/support/hstore.rb
superstore-1.1.4 test/support/hstore.rb
superstore-1.1.3 test/support/hstore.rb
superstore-1.1.2 test/support/hstore.rb
superstore-1.1.1 test/support/hstore.rb
superstore-1.1.0 test/support/hstore.rb
superstore-1.0.12 test/support/hstore.rb
superstore-1.0.11 test/support/hstore.rb
superstore-1.0.10 test/support/hstore.rb
superstore-1.0.9 test/support/hstore.rb
superstore-1.0.8 test/support/hstore.rb
superstore-1.0.7 test/support/hstore.rb
superstore-1.0.6 test/support/hstore.rb
superstore-1.0.5 test/support/hstore.rb
superstore-1.0.4 test/support/hstore.rb
superstore-1.0.3 test/support/hstore.rb
superstore-1.0.2 test/support/hstore.rb