Sha256: 93d110a423b3d7e647bb7222cfde4967ba82c62770823093471451ca610f3389
Contents?: true
Size: 800 Bytes
Versions: 21
Compression:
Stored size: 800 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/javascript_include' ) class JavascriptIncludeTest < Test::Unit::TestCase include MasterView::Directives def setup @directives = MasterView::DirectiveSet.new end def test_default tag = MasterView::Tag.new(@directives, 'foo', {}, :normal, nil) @directives.directives = [] attr_value = "hello world" @directives << Javascript_include.new(attr_value) assert_equal nil, @directives.determine_dcs(:stag).render dcs = @directives.determine_dcs(:etag) dcs.context = tag.create_context assert_equal "<%= javascript_include_tag 'hello world' %>", dcs.render end end
Version data entries
21 entries across 21 versions & 2 rubygems