Sha256: 213b9ba6a92bb5a00240ce41a3469f4c305186d248d51b38c65d4ea030cb75ff
Contents?: true
Size: 834 Bytes
Versions: 21
Compression:
Stored size: 834 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/replace') class TestReplace < Test::Unit::TestCase include MasterView::Directives def setup @directives = MasterView::DirectiveSet.new end def test_replace tag = MasterView::Tag.new(@directives, 'foo', { 'id' => 'foobar', 'style' => 'test'}, :normal, nil) @directives.directives = [] attr_value = "h @product[name]" @directives << Replace.new(attr_value) assert_equal nil, @directives.determine_dcs(:stag).render dcs = @directives.determine_dcs(:etag) dcs.context = tag.create_context dcs.context[:tag].content = "hello world" assert_equal "<%= h @product[name] %>", dcs.render end end
Version data entries
21 entries across 21 versions & 2 rubygems