Sha256: 919469f3af204763cebb063a1ca738c06299e846225ff02d2c52471986cc99de

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

require 'spec_helper'

describe ROM::SQL, '.migration' do
  let(:connection) { ROM::SQL.gateway.connection }
  let(:configuration) { ROM::Configuration.new(:sql, DB_URI) }

  before do
    configuration
    connection.drop_table?(:dragons)
  end

  xit 'creates a migration for a specific gateway' do
    migration = ROM::SQL.migration do
      change do
        create_table :dragons do
          primary_key :id
          column :name, String
        end
      end
    end

    migration.apply(connection, :up)

    expect(connection.table_exists?(:dragons)).to be(true)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rom-sql-0.7.0 spec/integration/migration_spec.rb
rom-sql-0.7.0.rc1 spec/integration/migration_spec.rb
rom-sql-0.7.0.beta1 spec/integration/migration_spec.rb