Sha256: 7b5271a6148ee40cc1c8c45ec7ccaa1f5993f0da9ed5f7bbec4b20259e73410c

Contents?: true

Size: 924 Bytes

Versions: 10

Compression:

Stored size: 924 Bytes

Contents

require File.join(File.dirname(__FILE__), "test_generator_helper.rb")

class TestGenerateBuiltinApplication < Test::Unit::TestCase
  include RubiGen::GeneratorTestHelper

  def setup
    bare_setup
  end
  
  def teardown
    bare_teardown
  end
  
  def test_ruby_app
    run_generator('ruby_app', [APP_ROOT], sources)
    assert_generated_file("Rakefile")
    assert_generated_file("README.txt")
    assert_generated_file("lib/#{PROJECT_NAME}.rb")
    assert_generated_file("test/test_helper.rb")
    assert_generated_file("script/generate")
    assert_generated_file("script/destroy")
    
    assert_generated_module("lib/#{PROJECT_NAME}")
  end

  private
  def sources
    [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path)),
     RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", "generators"))
    ]
  end
  
  def generator_path
    "app_generators"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubigen-1.5.8 test/test_generate_builtin_application.rb
rubigen-1.5.7 test/test_generate_builtin_application.rb
rubigen-1.5.6 test/test_generate_builtin_application.rb
rubigen-1.5.5 test/test_generate_builtin_application.rb
rubigen-1.5.4 test/test_generate_builtin_application.rb
rubigen-1.5.3 test/test_generate_builtin_application.rb
rubigen-1.5.0 test/test_generate_builtin_application.rb
rubigen-1.5.1 test/test_generate_builtin_application.rb
rubigen-1.4.0 test/test_generate_builtin_application.rb
rubigen-1.5.2 test/test_generate_builtin_application.rb