Sha256: ff58c23d8884f4ead4ea51536f688a0bb64d15d272ac5d7253db49b8eb6732c0
Contents?: true
Size: 934 Bytes
Versions: 5
Compression:
Stored size: 934 Bytes
Contents
#!/usr/bin/env ruby require 'test/unit' currentPath = File.dirname(__FILE__) require File.join( currentPath, '../lib/masterview' ) require File.join( currentPath, '../lib/masterview/directives/import_render') class TestImportRender < Test::Unit::TestCase include MasterView::Directives include MasterView::DirectiveHelpers def setup @directives = MasterView::DirectiveSet.new end def test_import_render import_render_tag = MasterView::Tag.new(@directives, 'bar', {}, :normal, nil) @directives.directives = [] attr_value = ':partial => foo/bar' @directives << Import_render.new(attr_value) dcs = @directives.determine_dcs(:stag) dcs.context = import_render_tag.create_context assert_equal nil, dcs.render dcs = @directives.determine_dcs(:etag) dcs.context = import_render_tag.create_context assert_equal ERB_EVAL+'render( '+attr_value+' )'+ERB_END, dcs.render.join end end
Version data entries
5 entries across 5 versions & 1 rubygems