class TemplateTest

Public Instance Methods

setup() click to toggle source
# File ../../../../../test/test_template.rb, line 7
def setup
  @name = nil
end
test_load() click to toggle source
# File ../../../../../test/test_template.rb, line 11
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
test_open_with_value() click to toggle source
# File ../../../../../test/test_template.rb, line 17
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