Sha256: 790bea45c38fdd87b06b31165571cbc0cc6f01a7f0773f2a35bb83a62a888ec4

Contents?: true

Size: 462 Bytes

Versions: 2

Compression:

Stored size: 462 Bytes

Contents

require 'spec_helper'

describe Gush::Migration do

  describe "#migrate" do
    it "applies a migration once" do
      class TestMigration < Gush::Migration
        def self.version
          123
        end
      end

      migration = TestMigration.new
      expect(migration).to receive(:up).once

      expect(migration.migrated?).to be(false)
      migration.migrate

      expect(migration.migrated?).to be(true)
      migration.migrate
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gush-4.1.0 spec/gush/migration_spec.rb
gush-4.0.0 spec/gush/migration_spec.rb