Sha256: 96c50342cf113d4b1f1d28181a39f048351f6039dd0ffc305a072ad0cdf18822

Contents?: true

Size: 1.13 KB

Versions: 1

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 "file creation" 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

1 entries across 1 versions & 1 rubygems

Version Path
authpro-0.1.0 test/authpro_generator_test.rb