Sha256: e3d212e52851786b9bd1c1845371bd3a42ce992fda4b46fe178ee86a51f44420
Contents?: true
Size: 1.38 KB
Versions: 5
Compression:
Stored size: 1.38 KB
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( testDirPath, 'test_helper' ) require File.join( testDirPath, 'directive_test_helper' ) DirectiveTestHelpers.load_directive('test_directive_events', "#{testDirPath}/fixtures/directives") class TestTestDirective < Test::Unit::TestCase include DirectiveTestHelpers TestEventsDirective = MasterView::DirectiveTests::TestEventsDirective # test subject def setup MasterView::IOMgr.erb = MasterView::MIO::StringHashMIOTree.new({}, '.rhtml', :logging => true) end def test_metadata check_metadata_keys TestEventsDirective check_metadata_values TestEventsDirective, 'mvtest', 'test_events' end def test_test_directive template = <<-END <div mv:generate='foo/bar'> <head mvtest:test_events="foo"> <!-- wow --> <![CDATA[ mycdata ]]> <title>hello</title> </head> </div> END expected = { 'foo/bar' => "<div>stag <head>stagend charsstart charsend commentstart <!-- wow -->commentend charsstart charsend cdatastart <![CDATA[ mycdata ]]>cdataend charsstart charsend before_child_title_stag <title>foo</title>charsstart charsend etag </head>etagend </div>" } assert_template_result expected, template end end
Version data entries
5 entries across 5 versions & 1 rubygems