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

Version Path
masterview-0.0.15 test/javascript_include_test.rb
masterview-0.0.10 test/javascript_include_test.rb
masterview-0.0.13 test/javascript_include_test.rb
masterview-0.0.2 test/javascript_include_test.rb
masterview-0.0.17 test/javascript_include_test.rb
masterview-0.0.16 test/javascript_include_test.rb
masterview-0.0.11 test/javascript_include_test.rb
masterview-0.0.12 test/javascript_include_test.rb
masterview-0.0.14 test/javascript_include_test.rb
masterview-0.1.5 test/javascript_include_test.rb
masterview-0.1.0 test/javascript_include_test.rb
masterview-0.1.1 test/javascript_include_test.rb
masterview-0.1.2 test/javascript_include_test.rb
masterview-0.1.3 test/javascript_include_test.rb
masterview-0.0.7 test/javascript_include_test.rb
masterview-0.0.8 test/javascript_include_test.rb
masterview-0.0.9 test/javascript_include_test.rb
masterview_parser-0.0.6 test/javascript_include_test.rb
masterview_parser-0.0.5 test/javascript_include_test.rb
masterview_parser-0.0.4 test/javascript_include_test.rb