Sha256: d6003796287ddb727c475c1ca0b7a76c423b00d8c507daf30ccbf04d7a2c8b75
Contents?: true
Size: 891 Bytes
Versions: 6
Compression:
Stored size: 891 Bytes
Contents
module Teabag::SpecHelper def stylesheet_link_tag_for_teabag(*sources) sources.collect do |source| asset = defined?(lookup_asset_for_path) ? lookup_asset_for_path(source, type: :stylesheet) : asset_paths.asset_for(source, "css") asset.to_a.map do |dep| stylesheet_link_tag(dep.pathname.to_s, href: "/assets/#{dep.logical_path}?body=1", type: "text/css").split("\n") end end.flatten.uniq.join("\n").html_safe end def javascript_include_tag_for_teabag(*sources) sources.collect do |source| asset = defined?(lookup_asset_for_path) ? lookup_asset_for_path(source, type: :javascript) : asset_paths.asset_for(source, "js") asset.to_a.map do |dep| javascript_include_tag(dep.pathname.to_s, src: "/assets/#{dep.logical_path}?body=1", type: "text/javascript").split("\n") end end.flatten.uniq.join("\n").html_safe end end
Version data entries
6 entries across 6 versions & 1 rubygems