Sha256: 3cd67370879bd4cb866f9b121bf90a02384d421da03d597a0e3360c73b4bf73c

Contents?: true

Size: 764 Bytes

Versions: 22

Compression:

Stored size: 764 Bytes

Contents

require "generators/doorkeeper/templates/migration"

module Garage
  module Test
    module Migrator
      extend ActiveSupport::Concern

      included do
        before(:all) do
          silence_stream(STDOUT) do
            begin
              CreateDoorkeeperTables.migrate(:up)
            rescue ActiveRecord::StatementInvalid
              # Rescue exceptions if the tables are already created.
            end
          end
        end

        after(:all) do
          silence_stream(STDOUT) do
            begin
              CreateDoorkeeperTables.migrate(:down)
            rescue ActiveRecord::StatementInvalid
              # Rescue exceptions if the tables are already created.
            end
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
the_garage-2.0.1 lib/garage/test/migrator.rb
the_garage-2.0.0 lib/garage/test/migrator.rb