Sha256: a20573594d021754771557d14a034b88e39a63f94d4c88897999d17c2f201f76
Contents?: true
Size: 1.24 KB
Versions: 4
Compression:
Stored size: 1.24 KB
Contents
require 'holder_rails' require 'minitest/autorun' class HolderRailsTest < ActionView::TestCase include HolderRails::Helpers test "size" do assert_dom_equal '<img data-src="holder.js/100x100?" src="" />', holder_tag(100) assert_dom_equal '<img data-src="holder.js/200x300?" src="" />', holder_tag('200x300') assert_dom_equal '<img data-src="holder.js/100px75?" src="" />', holder_tag('100px75') end test "text" do assert_dom_equal '<img data-src="holder.js/200x300?text=Lorem ipsum" src="" />', holder_tag('200x300', 'Lorem ipsum') end test "theme" do assert_dom_equal '<img data-src="holder.js/200x300?text=Lorem ipsum&theme=social" src="" />', holder_tag('200x300', 'Lorem ipsum', 'social') end test "html_options" do assert_dom_equal '<img class="special" data-src="holder.js/500x800?text=Example text&theme=gray" id="new" src="" />', holder_tag('500x800', 'Example text', 'gray', id: 'new', class: 'special') end test "holder_options" do assert_dom_equal '<img class="special" data-src="holder.js/500x800?font=Helvetica&text=Example text&theme=gray" id="new" src="" />', holder_tag('500x800', 'Example text', 'gray', { id: 'new', class: 'special' }, { font: 'Helvetica' }) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
holder_rails-2.9.3.1 | test/holder_rails_test.rb |
holder_rails-2.9.3 | test/holder_rails_test.rb |
holder_rails-2.9.2 | test/holder_rails_test.rb |
holder_rails-2.9.1 | test/holder_rails_test.rb |