Sha256: 4621808e56fdca4fc16360ba32016fc3959373f2501b35990ceaa6a384b02963

Contents?: true

Size: 575 Bytes

Versions: 4

Compression:

Stored size: 575 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe ActiveRecord::Migration do

  let(:connection) { ActiveRecord::Base.connection }

  it "works with the latest migration object version" do
    ActiveRecord::Migration.suppress_messages do
      begin
        migration = Class.new ::ActiveRecord::Migration.latest_version do
          create_table :newtable, :force => true
        end
        migration.migrate(:up)
        expect(connection.tables_only).to include 'newtable'
      ensure
        connection.drop_table :newtable, if_exists: true
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
schema_plus_compatibility-1.0.0 spec/migration_spec.rb
schema_plus_compatibility-0.4.0 spec/migration_spec.rb
schema_plus_compatibility-0.3.0 spec/migration_spec.rb
schema_plus_compatibility-0.2.0 spec/migration_spec.rb