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