Sha256: 7ba4ab4e7188ae7c833f2a05b5be091948e6b988ccd541bf879269917e447bfa

Contents?: true

Size: 621 Bytes

Versions: 6

Compression:

Stored size: 621 Bytes

Contents

require File.expand_path('../../../lib/generators/cbac/copy_files/migrate/create_cbac_from_scratch.rb', __FILE__)

class Cbac::Schema
  DATABASE_FILE = File.expand_path('../test.sqlite3', __FILE__)

  def self.load
    print "Loading fresh database schema..."

    connect!
    CreateCbacFromScratch.suppress_messages do
      CreateCbacFromScratch.up
    end
    connect!

    puts "done"
  end

  def self.drop
    FileUtils.rm_rf(DATABASE_FILE)
  end

private
  def self.connect!
    ActiveRecord::Base.establish_connection(
      :adapter => 'sqlite3',
      :database => Cbac::Schema::DATABASE_FILE
    )
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cbac-0.8.0 spec/support/schema.rb
cbac-0.7.0 spec/support/schema.rb
cbac-0.6.10 spec/support/schema.rb
cbac-0.6.9 spec/support/schema.rb
cbac-0.6.8 spec/support/schema.rb
cbac-0.6.7 spec/support/schema.rb