Sha256: e6b79400b21e72039ac5f8b07207dd17c4b2aac256be590f1a577b17fe08bb0f

Contents?: true

Size: 629 Bytes

Versions: 14

Compression:

Stored size: 629 Bytes

Contents

require "test_helper"

if DEVISE_ORM == :mongo_id
  require "generators/mongo_id/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

14 entries across 14 versions & 3 rubygems

Version Path
devise_sociable-0.1.0 vendor/bundle/gems/devise-1.2.1/test/generators/mongoid_generator_test.rb
devise-1.4.2 test/generators/mongoid_generator_test.rb
devise-1.4.1 test/generators/mongoid_generator_test.rb
devise-1.3.4 test/generators/mongoid_generator_test.rb
devise-1.3.3 test/generators/mongoid_generator_test.rb
devise-1.3.2 test/generators/mongoid_generator_test.rb
devise-1.3.1 test/generators/mongoid_generator_test.rb
devise-1.3.0 test/generators/mongoid_generator_test.rb
devise-1.2.1 test/generators/mongoid_generator_test.rb
devise-1.2.0 test/generators/mongoid_generator_test.rb
devise-jdguyot-1.2.rc3 test/generators/mongoid_generator_test.rb
devise-1.2.rc2 test/generators/mongoid_generator_test.rb
devise-jdguyot-1.2.rc2 test/generators/mongoid_generator_test.rb
devise-jdguyot-1.2.rc test/generators/mongoid_generator_test.rb