summaryrefslogtreecommitdiff
path: root/test/scanners/coderay_suite.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-03-31 22:17:06 +0000
committermurphy <murphy@rubychan.de>2010-03-31 22:17:06 +0000
commit862bc9aa6b002f6b29cf74f93ca66e63cf370819 (patch)
tree45e8a8731fadca8df5fe86595dc2e8f6dc7a3782 /test/scanners/coderay_suite.rb
parentcce5dad0dce285a2b7c4f1fe0ec79d10c71a8403 (diff)
downloadcoderay-862bc9aa6b002f6b29cf74f93ca66e63cf370819.tar.gz
Upporting changes from 0.9.2 (vs. 0.9.1).
Diffstat (limited to 'test/scanners/coderay_suite.rb')
-rw-r--r--test/scanners/coderay_suite.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/scanners/coderay_suite.rb b/test/scanners/coderay_suite.rb
index 60f71be..3a98c6b 100644
--- a/test/scanners/coderay_suite.rb
+++ b/test/scanners/coderay_suite.rb
@@ -11,6 +11,8 @@ $:.unshift File.join($mydir, '..', 'lib')
require 'term/ansicolor' unless ENV['nocolor']
+require 'test/unit'
+
if defined? Term::ANSIColor
class String
include Term::ANSIColor
@@ -413,6 +415,13 @@ module CodeRay
return false
end
File.open(actual_html, 'w') { |f| f.write highlighted }
+ if okay
+ debug = $DEBUG
+ $DEBUG = false
+ FileUtils.copy(actual_html, name + '.expected.html')
+ $DEBUG = debug
+ end
+ true
end
expected_html = name + '.expected.html'