Sha256: 93dd998bc43a40b46be10b4922951c60fa6372245c683d1802a19827a5f2906e

Contents?: true

Size: 502 Bytes

Versions: 10

Compression:

Stored size: 502 Bytes

Contents

module MigrationsHelper
  def run_migration(migration, directions)
    silence_stream(STDOUT) do
      Array.wrap(directions).each do |direction|
        migration.migrate(direction)
      end
    end
  end

  def migration_class
    if Rails::VERSION::MAJOR >= 5
      ::ActiveRecord::Migration[5.0]
    else
      ::ActiveRecord::Migration
    end
  end

  def connection
    @_connection ||= ActiveRecord::Base.connection
  end
end

RSpec.configure do |config|
  config.include MigrationsHelper
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
fx-0.7.0 spec/support/migration_helpers.rb
fx-jets-0.6.3s spec/support/migration_helpers.rb
fx-0.6.2 spec/support/migration_helpers.rb
fx-0.6.1 spec/support/migration_helpers.rb
fx-0.6.0 spec/support/migration_helpers.rb
fx-0.5.0 spec/support/migration_helpers.rb
fx-0.4.0 spec/support/migration_helpers.rb
fx-0.3.1 spec/support/migration_helpers.rb
fx-0.3.0 spec/support/migration_helpers.rb
fx-0.2.0 spec/support/migration_helpers.rb