Sha256: b97d4c20be878f6b8cea84d5f3b5bd6d8f54a0b907ca2f5ae106173f8a7aecdf

Contents?: true

Size: 625 Bytes

Versions: 14

Compression:

Stored size: 625 Bytes

Contents

require 'test_helper'
require 'review/template'

class TemplateTest < Test::Unit::TestCase
  include ReVIEW

  def setup
    @name = nil
  end

  def test_load
    tmplfile = File.expand_path('./assets/test.xml.erb', File.dirname(__FILE__))
    tmpl = ReVIEW::Template.load(tmplfile)
    assert_equal("<test>\n<name></name>\n</test>\n", tmpl.result(binding))
  end

  def test_open_with_value
    tmplfile = File.expand_path('./assets/test.xml.erb', File.dirname(__FILE__))
    tmpl = ReVIEW::Template.load(tmplfile)
    @name = 'test'
    assert_equal("<test>\n<name>test</name>\n</test>\n", tmpl.result(binding))
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
review-5.0.0 test/test_template.rb
review-4.2.0 test/test_template.rb
review-4.1.0 test/test_template.rb
review-4.0.0 test/test_template.rb
review-3.2.0 test/test_template.rb
review-3.1.0 test/test_template.rb
review-3.0.0 test/test_template.rb
review-3.0.0.rc1 test/test_template.rb
review-3.0.0.preview4 test/test_template.rb
review-3.0.0.preview3 test/test_template.rb
review-3.0.0.preview2 test/test_template.rb
review-3.0.0.preview1 test/test_template.rb
review-2.5.0 test/test_template.rb
review-2.4.0 test/test_template.rb