Sha256: 374e5b55b4fd5bafb7bf5553814c38c58be2206d096bfc0d83be42a38f65a8da

Contents?: true

Size: 770 Bytes

Versions: 9

Compression:

Stored size: 770 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe DataMigrate::Tasks::DataMigrateTasks do
  let(:db_config) do
    {
      adapter: "sqlite3",
      database: "spec/db/test.db"
    }
  end

  before do
    allow(DataMigrate::DataMigrator).to receive(:db_config) { db_config }
    ActiveRecord::Base.establish_connection(db_config)
  end

  after do
    ActiveRecord::Migration.drop_table("data_migrations")
  end

  describe :migrate do
    it do
       expect {
        DataMigrate::Tasks::DataMigrateTasks.migrate
       }.to output(/20091231235959 SomeName: migrating/).to_stdout
    end

    it do
      expect {
        DataMigrate::Tasks::DataMigrateTasks.migrate
      }.to output(/20171231235959 SuperUpdate: migrating/).to_stdout
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
data_migrate-6.2.0 spec/data_migrate/tasks/data_migrate_tasks_spec.rb
data_migrate-6.1.0 spec/data_migrate/tasks/data_migrate_tasks_spec.rb
data_migrate-6.0.7 spec/data_migrate/tasks/data_migrate_tasks_spec.rb
data_migrate-6.0.6 spec/data_migrate/tasks/data_migrate_tasks_spec.rb
data_migrate-6.0.5 spec/data_migrate/tasks/data_migrate_tasks_spec.rb
data_migrate-6.0.4.beta spec/data_migrate/tasks/data_migrate_tasks_spec.rb
data_migrate-6.0.3.beta spec/data_migrate/tasks/data_migrate_tasks_spec.rb
data_migrate-6.0.1.beta spec/data_migrate/tasks/data_migrate_tasks_spec.rb
data_migrate-6.0.0.beta spec/data_migrate/tasks/data_migrate_tasks_spec.rb