about summary refs log tree commit homepage
path: root/test/helper.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-30 01:50:21 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-30 07:01:05 +0000
commit03c193bf6c742ea445e74a009d2502d2a6bda9f8 (patch)
treeca37592fe95590fa038108e33ffba00247821d66 /test/helper.rb
parente3b7523f3570d7ccf8d88fe4c3c854b677dc7e4f (diff)
downloadyahns-03c193bf6c742ea445e74a009d2502d2a6bda9f8.tar.gz
This is often forgotten, and we need to make a tweak to the
coverage generator to dump correctly.
Diffstat (limited to 'test/helper.rb')
-rw-r--r--test/helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/helper.rb b/test/helper.rb
index 3f141e4..5e417ae 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -17,12 +17,13 @@ GTL = Mutex.new
 if ENV["COVERAGE"]
   require "coverage"
   COVMATCH = %r{/lib/yahns\b.*rb\z}
+  COVDUMPFILE = File.expand_path("coverage.dump")
 
   def __covmerge
     res = Coverage.result
 
-    # do not create the file, Makefile does htis before any tests run
-    File.open("coverage.dump", IO::RDWR) do |covtmp|
+    # do not create the file, Makefile does this before any tests run
+    File.open(COVDUMPFILE, IO::RDWR) do |covtmp|
       covtmp.binmode
       covtmp.sync = true