Sha256: 50d8862f7e1e241197343797b25dda8a9140c8f78420650ad9df68c96f586de7
Contents?: true
Size: 987 Bytes
Versions: 4
Compression:
Stored size: 987 Bytes
Contents
#!/usr/bin/env ruby require 'test/unit' currentPath = File.dirname(__FILE__) testDirPath = File.join( currentPath, '..' ) require File.join( currentPath, '../../lib/masterview' ) require File.join( currentPath, '../../lib/masterview/deprecated/directive_base' ) require File.join( testDirPath, 'test_helper' ) require File.join( testDirPath, 'directive_test_helper' ) class TestDirectiveOld < MasterView::DirectiveBaseOld def stag(dcs) 'Hello '+attr_value end def etag(dcs) end end class TestTestDirectiveOld < Test::Unit::TestCase include DirectiveTestHelpers def setup MasterView::IOMgr.erb = MasterView::MIO::StringHashMIOTree.new({}, '.rhtml', :logging => true) end def test_test_directive template = <<-END <div mv:generate='foo/bar'> <head mvx:test_directive_old="woo"> </head> </div> END expected = { 'foo/bar' => "<div>Hello woo </div>" } assert_template_result expected, template end end
Version data entries
4 entries across 4 versions & 1 rubygems