Sha256: 7b0ac5edbd7631d4f6bcd4ee5d38672d1c70a9d0267651e13d00bb5da8b9d341

Contents?: true

Size: 749 Bytes

Versions: 3

Compression:

Stored size: 749 Bytes

Contents

require 'test/unit'
require 'html/template/pro'

class TestBasic < Test::Unit::TestCase
  def test_basic
    template = HTML::Template::Expr.new(:path     => ['test/templates'],
                                       :filename => 'foo.tmpl')
    template.param(:foo => 100)
    output = template.output()
    assert_match(/greater than/i, output, "greater than")

    template.param(:foo => 10)
    output = template.output()
    assert_match(/less than/i, output, "less than")

    template = HTML::Template::Expr.new(:path => ['test/templates'],
                                        :filename => 'negative.tmpl')
    template.param(:foo => 100)
    output = template.output()
    assert_match(/Yes/, output, "negative numbers work")

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
html-template-pro-0.0.3 test/test_basic.rb
html-template-pro-0.0.2 test/test_basic.rb
html-template-pro-0.0.1 test/test_basic.rb