Sha256: 47a6ee28ddc34115bb2e4fc16a2766e2fae8f1c6bdaaaab6af65ce9f163d8238

Contents?: true

Size: 742 Bytes

Versions: 18

Compression:

Stored size: 742 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"
require "generators/doorkeeper/migration_generator"

describe "Doorkeeper::MigrationGenerator" do
  include GeneratorSpec::TestCase

  tests Doorkeeper::MigrationGenerator
  destination ::File.expand_path("../tmp/dummy", __FILE__)

  describe "after running the generator" do
    before :each do
      prepare_destination
    end

    it "creates a migration with a version specifier" do
      stub_const("ActiveRecord::VERSION::MAJOR", 5)
      stub_const("ActiveRecord::VERSION::MINOR", 0)

      run_generator

      assert_migration "db/migrate/create_doorkeeper_tables.rb" do |migration|
        assert migration.include?("ActiveRecord::Migration[5.0]\n")
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
doorkeeper-5.1.2 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.6 spec/generators/migration_generator_spec.rb
doorkeeper-5.3.3 spec/generators/migration_generator_spec.rb
doorkeeper-5.1.1 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.5 spec/generators/migration_generator_spec.rb
doorkeeper-5.3.2 spec/generators/migration_generator_spec.rb
doorkeeper-5.4.0.rc1 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.4 spec/generators/migration_generator_spec.rb
doorkeeper-5.3.1 spec/generators/migration_generator_spec.rb
doorkeeper-5.3.0 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.3 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.2 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.1 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.0 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.0.rc3 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.0.rc2 spec/generators/migration_generator_spec.rb
doorkeeper-5.2.0.rc1 spec/generators/migration_generator_spec.rb
doorkeeper-5.1.0 spec/generators/migration_generator_spec.rb