Sha256: e6532a1feb578839ba308bccadda8e8151b5bf99aec92b39370a2df26d3b1314

Contents?: true

Size: 674 Bytes

Versions: 5

Compression:

Stored size: 674 Bytes

Contents

require "test_helper"

if [:data_mapper, :data_mapper_active_model].include?(DEVISE_ORM)
  require "generators/data_mapper/devise_generator"

  class DataMapperGeneratorTest < Rails::Generators::TestCase
    tests DataMapper::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

5 entries across 5 versions & 1 rubygems

Version Path
dm-devise-2.2.1 test/generators/data_mapper_generator_test.rb
dm-devise-2.2.0 test/generators/data_mapper_generator_test.rb
dm-devise-2.1.0 test/generators/data_mapper_generator_test.rb
dm-devise-2.0.1 test/generators/data_mapper_generator_test.rb
dm-devise-2.0.0 test/generators/data_mapper_generator_test.rb