Sha256: 6e324b7fc99acf411dbf42c98c27636041ef3c6c91efba15780a985ed413dc98

Contents?: true

Size: 1.13 KB

Versions: 7

Compression:

Stored size: 1.13 KB

Contents

require 'test_helper'

# Docs: http://rdoc.info/github/rails/rails/master/Rails/Generators/TestCase
class AuthproGeneratorTest < Rails::Generators::TestCase
  tests AuthproGenerator
  destination File.expand_path(File.join(File.dirname(__FILE__), "rails", "dummy"))

  test "generated files" do 
    run_generator(["--force"])
    
    # models
    assert_file "app/models/user.rb"

    # migrations
    assert_migration "db/migrate/create_users.rb"

    # controllers
    assert_file "app/controllers/users_controller.rb"
    assert_file "app/controllers/sessions_controller.rb"
    assert_file "app/controllers/password_resets_controller.rb"
    assert_file "app/controllers/home_controller.rb"

    # views
    assert_file "app/views/users/new.html.erb"
    assert_file "app/views/password_resets/new.html.erb"
    assert_file "app/views/password_resets/edit.html.erb"
    assert_file "app/views/sessions/new.html.erb"
    assert_file "app/views/layouts/application.html.erb"
    assert_file "app/views/home/index.html.erb"
    assert_file "app/views/user_mailer/password_reset.text.erb"

    # mailers
    assert_file "app/mailers/user_mailer.rb"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
authpro-1.1.0 test/authpro_generator_test.rb
authpro-1.0.1 test/authpro_generator_test.rb
authpro-1.0.0 test/authpro_generator_test.rb
authpro-0.9.3 test/authpro_generator_test.rb
authpro-0.9.2 test/authpro_generator_test.rb
authpro-0.9.1 test/authpro_generator_test.rb
authpro-0.9.0 test/authpro_generator_test.rb