Sha256: 201ec625eb6703041d91d3f5faae7447dfaa2e2c9bf326a118e29bdd4e8ab4c9

Contents?: true

Size: 644 Bytes

Versions: 7

Compression:

Stored size: 644 Bytes

Contents

require 'test_helper'
require 'generators/autocomplete_generator'

class AutocompleteGeneratorTest < Test::Unit::TestCase
  def setup
    @destination = File.join('tmp', 'test_app')
    @source      = AutocompleteGenerator.source_root
    @filename    = File.join(@destination, 'public', 'javascripts', 'autocomplete-rails.js')

    File.unlink(@filename) if File.exists?(@filename)

    AutocompleteGenerator.start('', :destination_root => @destination)
  end

  def test_install
    assert File.exists?(@filename)

    assert_equal(
        File.read(File.join(@source, 'autocomplete-rails.js')),
        File.read(@filename)
    )
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rails3-jquery-autocomplete-0.7.5 test/generators/generator_test.rb
rails3-jquery-autocomplete-0.7.4 test/generators/generator_test.rb
rails3-jquery-autocomplete-0.7.3 test/generators/generator_test.rb
rails3-jquery-autocomplete-0.7.2 test/generators/generator_test.rb
rails3-jquery-autocomplete-0.7.1 test/generators/generator_test.rb
rails3-jquery-autocomplete-0.7.0 test/generators/generator_test.rb
rails3-jquery-autocomplete-0.6.6 test/generators/generator_test.rb