Sha256: b5f87428c91241ec82e0d300a4292086395027986cf47a2cdd17386d35f68f04

Contents?: true

Size: 624 Bytes

Versions: 6

Compression:

Stored size: 624 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')

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

  def setup
    @directives = MasterView::DirectiveSet.new
  end

  def test_if
    @directives.directives = []
    attr_value = 'true'
    @directives << If.new(attr_value)
    assert_equal "<% if #{attr_value} %>", @directives.determine_dcs(:stag).render.join
    assert_equal "<% end %>", @directives.determine_dcs(:etag).render.join
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
masterview-0.2.0 test/unit/directive_if_test.rb
masterview-0.2.1 test/unit/directive_if_test.rb
masterview-0.2.2 test/unit/directive_if_test.rb
masterview-0.2.3 test/unit/directive_if_test.rb
masterview-0.2.4 test/unit/directive_if_test.rb
masterview-0.2.5 test/unit/directive_if_test.rb