Selaa lähdekoodia

more send fun goodness

tags/0.2.3
Chris Anderson 16 vuotta sitten
vanhempi
commit
a354b55156
1 muutettua tiedostoa jossa 11 lisäystä ja 3 poistoa
  1. +11
    -3
      test/mustache_spec.rb

+ 11
- 3
test/mustache_spec.rb Näytä tiedosto

@@ -70,7 +70,9 @@ describe "mustache" do
#{view} #{view}
var chunks = []; var chunks = [];
var sendFun = function(chunk) { var sendFun = function(chunk) {
chunks.push(chunk);
if (chunk != "") {
chunks.push(chunk);
}
} }
var template = #{template}; var template = #{template};
Mustache.to_html(template, #{testname}, null, sendFun); Mustache.to_html(template, #{testname}, null, sendFun);
@@ -118,8 +120,14 @@ describe "mustache" do
#{view}; #{view};
var template = #{template}; var template = #{template};
var partials = {"partial": #{partial}}; var partials = {"partial": #{partial}};
var result = Mustache.to_html(template, partial_context, partials);
print(result);
var chunks = [];
var sendFun = function(chunk) {
if (chunk != "") {
chunks.push(chunk);
}
}
Mustache.to_html(template, partial_context, partials, null, sendFun);
print(chunks.join("\\n"));
} catch(e) { } catch(e) {
print('ERROR: ' + e.message); print('ERROR: ' + e.message);
} }


Loading…
Peruuta
Tallenna