From 10281c72c781ed02df6cf82a3f309cd5234eef27 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 23 Feb 2013 16:22:29 -0600 Subject: don't need this anymore since it was moved inside the class --- src/test/scala/org/perl8/test/TestMoreTest.scala | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/test/scala/org/perl8/test/TestMoreTest.scala b/src/test/scala/org/perl8/test/TestMoreTest.scala index 7ee183a..bee1e64 100644 --- a/src/test/scala/org/perl8/test/TestMoreTest.scala +++ b/src/test/scala/org/perl8/test/TestMoreTest.scala @@ -5,10 +5,6 @@ import java.io.ByteArrayOutputStream import org.perl8.test.tap.Consumer class TestMoreTest extends TestMore { - private object OutputContainer { - val output = new ByteArrayOutputStream - } - val lineZero = Thread.currentThread.getStackTrace()(1).getLineNumber + 3 def line (offset: Int) = lineZero + offset @@ -61,13 +57,14 @@ class TestMoreTest extends TestMore { } } - Console.withOut(OutputContainer.output) { - Console.withErr(OutputContainer.output) { + val out = new ByteArrayOutputStream + Console.withOut(out) { + Console.withErr(out) { (new MyBasicTest).run } } - is(Consumer.parse(OutputContainer.output).exitCode, 9, "got the right plan") + is(Consumer.parse(out).exitCode, 9, "got the right plan") val expected = "# ok\n" + @@ -145,5 +142,5 @@ class TestMoreTest extends TestMore { "1..23\n" + "# Looks like you failed 9 tests of 23.\n" - is(OutputContainer.output.toString, expected, "correct tap") + is(out.toString, expected, "correct tap") } -- cgit v1.2.3-54-g00ecf