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.8.2 lib/garage/test/migrator.rb
the_garage-2.8.1 lib/garage/test/migrator.rb
the_garage-2.8.0 lib/garage/test/migrator.rb
the_garage-2.7.0 lib/garage/test/migrator.rb
the_garage-2.6.1 lib/garage/test/migrator.rb
the_garage-2.6.0 lib/garage/test/migrator.rb
the_garage-2.5.0 lib/garage/test/migrator.rb
the_garage-2.4.4 lib/garage/test/migrator.rb
the_garage-2.4.3 lib/garage/test/migrator.rb
the_garage-2.4.2 lib/garage/test/migrator.rb
the_garage-2.4.1 lib/garage/test/migrator.rb
the_garage-2.4.0 lib/garage/test/migrator.rb
the_garage-2.3.3 lib/garage/test/migrator.rb
the_garage-2.3.2 lib/garage/test/migrator.rb
the_garage-2.3.1 lib/garage/test/migrator.rb
the_garage-2.3.0 lib/garage/test/migrator.rb
the_garage-2.2.0 lib/garage/test/migrator.rb
the_garage-2.1.0 lib/garage/test/migrator.rb
the_garage-2.0.3 lib/garage/test/migrator.rb
the_garage-2.0.2 lib/garage/test/migrator.rb