Sha256: d059ac6b52d9014c87da277187a4d146c4d33c738bf32b5d69e502897cdbf4f7

Contents?: true

Size: 678 Bytes

Versions: 7

Compression:

Stored size: 678 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

7 entries across 7 versions & 1 rubygems

Version Path
dm-devise-1.5.0 test/generators/data_mapper_generator_test.rb
dm-devise-1.5.0.beta test/generators/data_mapper_generator_test.rb
dm-devise-1.4.0 test/generators/data_mapper_generator_test.rb
dm-devise-1.3.1 test/generators/data_mapper_generator_test.rb
dm-devise-1.3.0 test/generators/data_mapper_generator_test.rb
dm-devise-1.2.0 test/generators/data_mapper_generator_test.rb
dm-devise-1.2.0.rc test/generators/data_mapper_generator_test.rb