Sha256: cffa6d0301fce93c8b31d32b7919d927deff8fdc9e94494b3806b68b82a80957
Contents?: true
Size: 706 Bytes
Versions: 5
Compression:
Stored size: 706 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/if') require File.join( currentPath, '../directive_test_helper' ) DirectiveTestHelpers.load_masterview_directive('if') class TestIf < Test::Unit::TestCase include DirectiveTestHelpers If = MasterView::Directives::If # test subject def setup create_template_element end def test_if attr_value = 'true' create_directive If, attr_value assert_equal "<% if( #{attr_value} ) -%>", render_element_event(:stag) assert_equal "<% end -%>", render_element_event(:etag) end end
Version data entries
5 entries across 5 versions & 1 rubygems