Sha256: 888732576523ba89e234550a0537e62a5f6fc477f0d02b2e76f10ce0f729a0f9

Contents?: true

Size: 1.2 KB

Versions: 20

Compression:

Stored size: 1.2 KB

Contents

require 'test_helper'

class InstallGeneratorTest < Rails::Generators::TestCase
  tests Maestrano::Generators::InstallGenerator
  destination File.expand_path("../../tmp", __FILE__)
  
  setup do
    prepare_destination
    copy_routes
  end
  
  should "create the maestrano initializer" do
    run_generator
    assert_file "config/initializers/maestrano.rb"
  end
  
  should "create the maestrano/auth/saml_controller" do
    run_generator
    assert_file "app/controllers/maestrano/auth/saml_controller.rb"
  end
  
  should "create the maestrano/account/groups_controller" do
    run_generator
    assert_file "app/controllers/maestrano/account/groups_controller.rb"
  end
  
  should "create the maestrano/account/group_users_controller" do
    run_generator
    assert_file "app/controllers/maestrano/account/group_users_controller.rb"
  end
  
  should "create the maestrano routes" do
    run_generator
    match = /maestrano_routes/
    assert_file "config/routes.rb", match
  end
  
  def copy_routes
    routes = File.expand_path("../../test_files/config/routes.rb", __FILE__)
    destination = File.join(destination_root, "config")

    FileUtils.mkdir_p(destination)
    FileUtils.cp routes, destination
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
maestrano-rails-0.15.4 test/generators/install_generator_test.rb
maestrano-rails-0.15.2 test/generators/install_generator_test.rb
maestrano-rails-0.15.1 test/generators/install_generator_test.rb
maestrano-rails-0.15.0 test/generators/install_generator_test.rb
maestrano-rails-0.14.0 test/generators/install_generator_test.rb
maestrano-rails-0.13.0 test/generators/install_generator_test.rb
maestrano-rails-0.12.0 test/generators/install_generator_test.rb
maestrano-rails-0.11.0 test/generators/install_generator_test.rb
maestrano-rails-0.10.0 test/generators/install_generator_test.rb
maestrano-rails-0.9.5 test/generators/install_generator_test.rb
maestrano-rails-0.9.4 test/generators/install_generator_test.rb
maestrano-rails-test-0.9.4 test/generators/install_generator_test.rb
maestrano-rails-test-0.9.3 test/generators/install_generator_test.rb
maestrano-rails-0.9.3 test/generators/install_generator_test.rb
maestrano-rails-0.9.2 test/generators/install_generator_test.rb
maestrano-rails-0.9.1 test/generators/install_generator_test.rb
maestrano-rails-0.9.0 test/generators/install_generator_test.rb
maestrano-rails-0.8.0 test/generators/install_generator_test.rb
maestrano-rails-0.7.0 test/generators/install_generator_test.rb
maestrano-rails-0.6.0 test/generators/install_generator_test.rb