Sha256: f7e395a9cee4559c12f190e19cce9ddc417bc5bd2bba062285bd221d870ba911

Contents?: true

Size: 715 Bytes

Versions: 12

Compression:

Stored size: 715 Bytes

Contents

require "test_helper"

class InstallGeneratorTest < Rails::Generators::TestCase
  tests Devise::Generators::InstallGenerator
  destination File.expand_path("../../tmp", __FILE__)
  setup :prepare_destination

  test "assert all files are properly created" do
    run_generator(["--orm=active_record"])
    assert_file "config/initializers/devise.rb", /devise\/orm\/active_record/
    assert_file "config/locales/devise.en.yml"
  end

  test "fails if no ORM is specified" do
    stderr = capture(:stderr) do
      run_generator
    end

    assert_match %r{An ORM must be set to install Devise}, stderr

    assert_no_file "config/initializers/devise.rb"
    assert_no_file "config/locales/devise.en.yml"
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
devise-4.3.0 test/generators/install_generator_test.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/devise-4.2.1/test/generators/install_generator_test.rb
devise-4.2.1 test/generators/install_generator_test.rb
devise-4.2.0 test/generators/install_generator_test.rb
devise-4.0.3 test/generators/install_generator_test.rb
devise-4.1.1 test/generators/install_generator_test.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/test/generators/install_generator_test.rb
devise-4.1.0 test/generators/install_generator_test.rb
devise-4.0.2 test/generators/install_generator_test.rb
devise-4.0.1 test/generators/install_generator_test.rb
devise-4.0.0 test/generators/install_generator_test.rb
devise-4.0.0.rc2 test/generators/install_generator_test.rb