Sha256: 59f7071a929d18c7f006b419714a055c720e3bb4da853e4a3edbebac30c87236

Contents?: true

Size: 734 Bytes

Versions: 21

Compression:

Stored size: 734 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/content')

class TestContent < Test::Unit::TestCase
  include MasterView::Directives

  def setup
    @directives = MasterView::DirectiveSet.new
    @tag = MasterView::Tag.new(@directives, 'foo', {}, :normal, nil)
  end

  def test_hello
    @directives.directives = []
    attr_value = 'hello world'
    @directives << Content.new(attr_value)
    dcs = @directives.determine_dcs(:etag)
    dcs.context = @tag.create_context
    assert_equal '', dcs.render.join
    assert_equal "<%= #{attr_value} %>", dcs.context[:tag].content
  end

end

Version data entries

21 entries across 21 versions & 2 rubygems

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