Sha256: b8e308b49c39e748149b6e3d43d7dbd1a31b5b80cec5a07c6639da17bcd927d7

Contents?: true

Size: 1001 Bytes

Versions: 34

Compression:

Stored size: 1001 Bytes

Contents

require File.dirname(__FILE__) + '/../helper.rb'

class TestGenerator < Test::Unit::TestCase

  def test_should_be_able_to_build_a_template
    skeleton = File.join(File.dirname(__FILE__), "../fixtures", "template.erb")
    opts = Options.new(%w[ --edge --sqlite --minimal myapp ])
    rails_template = Generator.build_template(opts, skeleton)
    assert_kind_of String, rails_template
    assert_match 'myapp', rails_template
    assert_match 'choosen_adapter = "sqlite"', rails_template
    assert_match 'choosen_plugin_set = "minimal"', rails_template
    assert_match 'ubiquo_branch = nil', rails_template
  end
  
  def test_should_generate_expected_template_from_custom_profile
    skeleton = File.join(File.dirname(__FILE__), "../fixtures", "template.erb")
    opts = Options.new(%w[ --custom ubiquo_media myapp ])
    rails_template = Generator.build_template(opts, skeleton)
    assert_kind_of String, rails_template
    assert_match 'choosen_plugin_set = "custom"', rails_template
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
ubiquo-0.9.0.b8 test/ubiquo/generator_test.rb
ubiquo-0.9.0.b6 test/ubiquo/generator_test.rb
ubiquo-0.9.0.b5 test/ubiquo/generator_test.rb
ubiquo-0.9.0.b4 test/ubiquo/generator_test.rb
ubiquo-0.9.0.b3 test/ubiquo/generator_test.rb
ubiquo-0.9.0.b2 test/ubiquo/generator_test.rb
ubiquo-0.9.0.b1 test/ubiquo/generator_test.rb
ubiquo-0.6.3 test/ubiquo/generator_test.rb
ubiquo-0.5.5 test/ubiquo/generator_test.rb
ubiquo-0.5.4 test/ubiquo/generator_test.rb
ubiquo-0.5.3 test/ubiquo/generator_test.rb
ubiquo-0.5.2 test/ubiquo/generator_test.rb
ubiquo-0.5.0 test/ubiquo/generator_test.rb
ubiquo-0.4.10 test/ubiquo/generator_test.rb
ubiquo-0.4.9 test/ubiquo/generator_test.rb
ubiquo-0.4.8 test/ubiquo/generator_test.rb
ubiquo-0.4.7 test/ubiquo/generator_test.rb
ubiquo-0.4.6 test/ubiquo/generator_test.rb
ubiquo-0.4.5 test/ubiquo/generator_test.rb
ubiquo-0.4.4 test/ubiquo/generator_test.rb