Sha256: 0d0b1920d10b68ea0776ebe6e01e8953da784626ac6f6965e90d75385f2f0493
Contents?: true
Size: 656 Bytes
Versions: 2
Compression:
Stored size: 656 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') class MyViewContext include ActionView::Helpers::TagHelper include Stache::AssetHelper end describe Stache::AssetHelper do def helper @helper ||= MyViewContext.new end describe "template_include_tag" do it "renders a script tag with the template contents" do File.stub!(:open).with(Rails.root.join("app/views/widgets/_oh_herro.html.mustache"), "rb"). and_return(StringIO.new("{{ awyeah }}")) helper.template_include_tag("widgets/oh_herro").should == "<script id=\"oh_herro_template\" type=\"text/html\">{{ awyeah }}</script>" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stache-0.0.2 | spec/stache/asset_helper_spec.rb |
stache-0.0.1 | spec/stache/asset_helper_spec.rb |