spec/wortsammler_spec.rb in wortsammler-0.0.5 vs spec/wortsammler_spec.rb in wortsammler-0.0.6

- old
+ new

@@ -171,14 +171,14 @@ system "#{wortsammler} -pbi '#{mdfile}' -o '#{tempdir}' -f pdf:latex" $?.success?.should==true Dir["#{tempdir}/chapternesting*"].map{|f|File.basename(f)}.sort.should== ["chapternesting.md", - "chapternesting.pdf", - "chapternesting.latex", - "chapternesting.md.bak" - ].sort + "chapternesting.pdf", + "chapternesting.latex", + "chapternesting.md.bak" + ].sort end it "handles lists up to 9 levels", exp: false do tempdir="#{specdir}/../testoutput" mdfile="#{tempdir}/listnesting.md" @@ -204,14 +204,14 @@ system "#{wortsammler} -pbi '#{mdfile}' -o '#{tempdir}' -f pdf:latex" $?.success?.should==true Dir["#{tempdir}/listnesting*"].map{|f|File.basename(f)}.sort.should== ["listnesting.md", - "listnesting.pdf", - "listnesting.latex", - "listnesting.md.bak" - ].sort + "listnesting.pdf", + "listnesting.latex", + "listnesting.md.bak" + ].sort end it "converts all files within a folder to output format" do tempdir=Dir.mktmpdir mdtext="# Header\n\n lorem ipsum\n" @@ -315,6 +315,17 @@ FileUtils.rm imagefile } $?.success?.should==true end -end + it "TC_EXP_001 expands expected results from testcases", exp: true do + + proc=ReferenceTweaker.new("pdf") + outfile="#{specdir}/../testoutput/TC_EXP_001.output.md" + File.unlink(outfile) if File.exists?(outfile) + proc.prepareFile("#{specdir}/TC_EXP_001.md", "#{specdir}/../testoutput/TC_EXP_001.output.md") + + a=File.open(outfile, "r").readlines.join + a.should include("TC_DES_003_01") + end + +end \ No newline at end of file