Sha256: 50d3768d0dcf0b9f27d58e4d5bc50a5ee163246ed73a3fd6936a5ee35356185b

Contents?: true

Size: 619 Bytes

Versions: 10

Compression:

Stored size: 619 Bytes

Contents

# encoding: utf-8

require 'test_helper'
require 'review/template'

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

  def setup
  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)
  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

10 entries across 10 versions & 2 rubygems

Version Path
review-1.7.2 test/test_template.rb
review-1.7.1 test/test_template.rb
review-peg-0.2.2 test/test_template.rb
review-peg-0.2.1 test/test_template.rb
review-peg-0.2.0 test/test_template.rb
review-peg-0.1.3 test/test_template.rb
review-peg-0.1.2 test/test_template.rb
review-peg-0.1.1 test/test_template.rb
review-peg-0.1.0 test/test_template.rb
review-1.7.0 test/test_template.rb