Sha256: 6f61f0dba3d00bd0edd50f0534c143f5889ec9df5547c15534f8946113000610

Contents?: true

Size: 618 Bytes

Versions: 21

Compression:

Stored size: 618 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

21 entries across 21 versions & 2 rubygems

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