Sha256: 858724f2d4a491ce4f1ec056f460feb45f77ec14a5b591bc4d0ddbbe6d780947

Contents?: true

Size: 1.11 KB

Versions: 19

Compression:

Stored size: 1.11 KB

Contents

require File.expand_path('../../helper', __FILE__)

class Reality::Generators::TestStandardTemplateSet < Reality::TestCase
  def test_template_set
    TestTemplateSetContainer.target_manager.target(:component)

    template_set =
      Reality::Generators::StandardTemplateSet.new(TestTemplateSetContainer,
                                                   :iris_entity,
                                                   :description => 'Templates that generate iris entities') do |t|

        t.erb_template([], :component, 'jpa/templates/mytemplate.java.erb', 'src/main/#{component.name}')
        t.ruby_template([], :component, 'jpa/templates/rubytemplate.java.rb', 'src/main/#{component.name}2')
      end


    assert_equal :iris_entity, template_set.name
    assert_equal [], template_set.required_template_sets
    assert_equal 2, template_set.templates.size
    assert_equal 'Templates that generate iris entities', template_set.description
    assert_equal true, template_set.template_by_name?('iris_entity:rubytemplate.java')
    assert_equal true, template_set.template_by_name?('iris_entity:mytemplate.java')
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
reality-generators-1.23.0 test/generators/test_standard_template_set.rb
reality-generators-1.22.0 test/generators/test_standard_template_set.rb
reality-generators-1.21.0 test/generators/test_standard_template_set.rb
reality-generators-1.20.0 test/generators/test_standard_template_set.rb
reality-generators-1.19.0 test/generators/test_standard_template_set.rb
reality-generators-1.18.0 test/generators/test_standard_template_set.rb
reality-generators-1.17.0 test/generators/test_standard_template_set.rb
reality-generators-1.16.0 test/generators/test_standard_template_set.rb
reality-generators-1.15.0 test/generators/test_standard_template_set.rb
reality-generators-1.14.0 test/generators/test_standard_template_set.rb
reality-generators-1.13.0 test/generators/test_standard_template_set.rb
reality-generators-1.12.0 test/generators/test_standard_template_set.rb
reality-generators-1.11.0 test/generators/test_standard_template_set.rb
reality-generators-1.10.0 test/generators/test_standard_template_set.rb
reality-generators-1.9.0 test/generators/test_standard_template_set.rb
reality-generators-1.8.0 test/generators/test_standard_template_set.rb
reality-generators-1.7.0 test/generators/test_standard_template_set.rb
reality-generators-1.6.0 test/generators/test_standard_template_set.rb
reality-generators-1.5.0 test/generators/test_standard_template_set.rb