summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2006-10-19 01:00:55 +0000
committermurphy <murphy@rubychan.de>2006-10-19 01:00:55 +0000
commit7ad4529165b20b16b1e5409db2c995c90c8294e4 (patch)
treed5c9c956324eb1f53d9a5d0fac53726e78c4d040 /test
parent3f5cc3ae69ecad6a6909aad4b553eb958241dd14 (diff)
downloadcoderay-7ad4529165b20b16b1e5409db2c995c90c8294e4.tar.gz
Improved fallback for scanner tests if Term::ANSIColor is not available.
Diffstat (limited to 'test')
-rw-r--r--test/scanners/coderay_suite.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/scanners/coderay_suite.rb b/test/scanners/coderay_suite.rb
index 5007d8e..070143f 100644
--- a/test/scanners/coderay_suite.rb
+++ b/test/scanners/coderay_suite.rb
@@ -17,8 +17,12 @@ rescue LoadError
end
rescue LoadError
class String
- def method_missing meth, *args
- self
+ for meth in %w(green red blue cyan magenta yellow concealed)
+ class_eval <<-END
+ def #{meth}
+ self
+ end
+ END
end
end
end