Sha256: 57565bbf77c03e4df427b62809015bd261628f76270cc52c4d19df45304942db
Contents?: true
Size: 469 Bytes
Versions: 1
Compression:
Stored size: 469 Bytes
Contents
require 'test_helper' class ContentTagIfTest < ActionView::TestCase test "show tag if condition is true" do assert_equal '<a>content</a>', content_tag_if(1 == 1, 'a') { 'content' } end test "not show tag if condition if false" do assert_equal 'content', content_tag_if(1 == 2, 'a') { 'content' } end test "accept options as attributes" do assert_equal '<a href="#">content</a>', content_tag_if(1 == 1, 'a', href: '#') { 'content' } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tuning-0.2.3 | test/content_tag_if_test.rb |