require 'test_helper'

class InstallGeneratorTest < Rails::Generators::TestCase
  tests Transloadit::Generators::InstallGenerator
  destination File.expand_path('../../../tmp', __FILE__)
  
  setup do
    prepare_destination
  end
  
  test 'the jQuery plugin is installed' do
    run_generator
    
    assert_file 'public/javascripts/jquery.transloadit2.js'
  end
  
  test 'the Transloadit config file is installed' do
    run_generator
    
    assert_file 'config/transloadit.yml'
  end
end
require 'test_helper'

class InstallGeneratorTest < Rails::Generators::TestCase
  tests Transloadit::Generators::InstallGenerator
  destination File.expand_path('../../../tmp', __FILE__)
  
  setup do
    prepare_destination
  end
  
  test 'the jQuery plugin is installed' do
    run_generator
    
    assert_file 'public/javascripts/jquery.transloadit2.js'
  end
  
  test 'the Transloadit config file is installed' do
    run_generator
    
    assert_file 'config/transloadit.yml'
  end
  
  test 'the namespace is transloadit:install' do
    assert_equal 'transloadit:install', generator_class.namespace
  end
end
Test the generator is named correctly
Test the generator is named correctly
