Sha256: 11a4e848d25e7372a97528aec31168645255cf49934e5013f7558158750f396d
Contents?: true
Size: 1.12 KB
Versions: 5
Compression:
Stored size: 1.12 KB
Contents
require 'test_helper' module CssSplitter class ApplicationHelperTest < ActionView::TestCase test "should work w/out options" do output = split_stylesheet_link_tag("too_big_stylesheet") assert_equal "<link href=\"/stylesheets/too_big_stylesheet.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n<!--[if lte IE 9]>\n<link href=\"/stylesheets/too_big_stylesheet_split2.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n<![endif]-->", output end test "should work with options and multiple stylesheets" do output = split_stylesheet_link_tag("too_big_stylesheet", "foo", media: "print") assert_equal "<link href=\"/stylesheets/too_big_stylesheet.css\" media=\"print\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"/stylesheets/foo.css\" media=\"print\" rel=\"stylesheet\" type=\"text/css\" />\n<!--[if lte IE 9]>\n<link href=\"/stylesheets/too_big_stylesheet_split2.css\" media=\"print\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"/stylesheets/foo_split2.css\" media=\"print\" rel=\"stylesheet\" type=\"text/css\" />\n<![endif]-->", output end end end
Version data entries
5 entries across 5 versions & 1 rubygems