From 75bc5455af8c3c3381066aac3d5fff42264cac6f Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Fri, 19 Aug 2011 03:09:35 +0200 Subject: Major rewrite of encoders to support IO output; fixed some minor scanner bugs; cleanups; dropped NitroXHTML scanner; improved tests --- test/lib/README | 1 - test/lib/assert_warning.rb | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/lib/assert_warning.rb (limited to 'test/lib') diff --git a/test/lib/README b/test/lib/README index 7d7a0a0..7c41648 100644 --- a/test/lib/README +++ b/test/lib/README @@ -1,3 +1,2 @@ Contents: - test/unit: We need the old Test::Unit for the scanner test suite to work with Ruby 1.9. -- term/ansicolor: Used for colorful output of the scanner tests. \ No newline at end of file diff --git a/test/lib/assert_warning.rb b/test/lib/assert_warning.rb new file mode 100644 index 0000000..828b464 --- /dev/null +++ b/test/lib/assert_warning.rb @@ -0,0 +1,15 @@ +class Test::Unit::TestCase + + def assert_warning expected_warning + require 'stringio' + oldstderr = $stderr + $stderr = StringIO.new + yield + $stderr.rewind + given_warning = $stderr.read.chomp + assert_equal expected_warning, given_warning + ensure + $stderr = oldstderr + end + +end -- cgit v1.2.1