Explorar el Código

failing tests

tags/0.4.0
Ben Cherry hace 15 años
padre
commit
5dc7c74e9b
Se han modificado 4 ficheros con 30 adiciones y 0 borrados
  1. +7
    -0
      examples/two_sections.html
  2. +1
    -0
      examples/two_sections.js
  3. +3
    -0
      examples/two_sections.txt
  4. +19
    -0
      test/mustache_spec.rb

+ 7
- 0
examples/two_sections.html Ver fichero

@@ -0,0 +1,7 @@
{{#show_following}}

{{/show_following}}
{{#show_following}}

{{/show_following}}


+ 1
- 0
examples/two_sections.js Ver fichero

@@ -0,0 +1 @@
var two_sections = {};

+ 3
- 0
examples/two_sections.txt Ver fichero

@@ -0,0 +1,3 @@
BAR bar
BAR bar
BAR bar

+ 19
- 0
test/mustache_spec.rb Ver fichero

@@ -92,6 +92,25 @@ describe "mustache" do
run_js(js).strip.should == "foo BAR"
end

it "should not suck" do
js = <<-JS
try{
#{@boilerplate}

print(Mustache.to_html("{{#foo}}\\
{{/foo}}\\
{{#bar}}\\
{{/bar}}\\
", {}));
} catch(e) {
print(e);
}
JS

run_js(js).should == "foanfs"
end


non_partials.each do |testname|
describe testname do
it "should generate the correct html" do


Cargando…
Cancelar
Guardar