spec/stache/asset_helper_spec.rb in stache-0.0.2 vs spec/stache/asset_helper_spec.rb in stache-0.0.3

- old
+ new

@@ -15,7 +15,16 @@ 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 + it "uses the template_base_path config setting to locate the template" do + Stache.configure do |c| + c.template_base_path = "/tmp/whee" + end + File.stub!(:open).with(Pathname.new("/tmp/whee/_whooo.html.mustache"), "rb"). + and_return(StringIO.new("{{ awyeah }}")) + + helper.template_include_tag("whooo").should == "<script id=\"whooo_template\" type=\"text/html\">{{ awyeah }}</script>" + end end end \ No newline at end of file