Sha256: da421ff9e6d9a9e4fdf6e67ece80cdb01ab7299843f010791e5724d13a509092

Contents?: true

Size: 622 Bytes

Versions: 37

Compression:

Stored size: 622 Bytes

Contents

require "test_helper"

if DEVISE_ORM == :mongoid
  require "generators/mongoid/devise_generator"

  class MongoidGeneratorTest < Rails::Generators::TestCase
    tests Mongoid::Generators::DeviseGenerator
    destination File.expand_path("../../tmp", __FILE__)
    setup :prepare_destination

    test "all files are properly created" do
      run_generator %w(monster)
      assert_file "app/models/monster.rb", /devise/
    end

    test "all files are properly deleted" do
      run_generator %w(monster)
      run_generator %w(monster), behavior: :revoke
      assert_no_file "app/models/monster.rb"
    end
  end
end

Version data entries

37 entries across 37 versions & 7 rubygems

Version Path
devise-4.3.0 test/generators/mongoid_generator_test.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/devise-4.2.1/test/generators/mongoid_generator_test.rb
devise-4.2.1 test/generators/mongoid_generator_test.rb
devise-4.2.0 test/generators/mongoid_generator_test.rb
devise-3.5.10 test/generators/mongoid_generator_test.rb
devise-4.0.3 test/generators/mongoid_generator_test.rb
devise-4.1.1 test/generators/mongoid_generator_test.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/test/generators/mongoid_generator_test.rb
devise-4.1.0 test/generators/mongoid_generator_test.rb
devise-3.5.9 test/generators/mongoid_generator_test.rb
devise-4.0.2 test/generators/mongoid_generator_test.rb
devise-4.0.1 test/generators/mongoid_generator_test.rb
devise-3.5.8 test/generators/mongoid_generator_test.rb
devise-3.5.7 test/generators/mongoid_generator_test.rb
devise-4.0.0 test/generators/mongoid_generator_test.rb
devise-4.0.0.rc2 test/generators/mongoid_generator_test.rb
devise-4.0.0.rc1 test/generators/mongoid_generator_test.rb
devise-3.5.6 test/generators/mongoid_generator_test.rb
devise-3.5.5 test/generators/mongoid_generator_test.rb
devise-3.5.4 test/generators/mongoid_generator_test.rb