diff options
author | Robey Pointer <robey@twitter.com> | 2010-12-16 18:50:55 -0800 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-07 02:08:37 -0500 |
commit | f7eccee6d4886d2aed9c1328fddd0159d40f6690 (patch) | |
tree | 480af4f0cb15e5365bdef4940378152c1740ab87 | |
parent | a219458fe9a55a60ae6a25a175b4925003eec074 (diff) | |
download | cbt-f7eccee6d4886d2aed9c1328fddd0159d40f6690.tar.gz cbt-f7eccee6d4886d2aed9c1328fddd0159d40f6690.tar.bz2 cbt-f7eccee6d4886d2aed9c1328fddd0159d40f6690.zip |
simplify this test.
-rw-r--r-- | libraries/eval/test/EvalTest.scala | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/libraries/eval/test/EvalTest.scala b/libraries/eval/test/EvalTest.scala index d72d145..d9b957c 100644 --- a/libraries/eval/test/EvalTest.scala +++ b/libraries/eval/test/EvalTest.scala @@ -5,17 +5,7 @@ import java.io.{File, FileOutputStream} object EvaluatorSpec extends Specification { def file(path: String) = { - val stream = getClass.getResourceAsStream(path) - val file = File.createTempFile(path, "scala") - val fos = new FileOutputStream(file) - - var byte = stream.read() - while (byte != -1) { - fos.write(byte) - byte = stream.read() - } - - file + new File("src/test/resources", path) } "Evaluator" should { @@ -24,7 +14,7 @@ object EvaluatorSpec extends Specification { } "apply(new File(...))" in { - Eval[Int](new File("src/test/resources/OnePlusOne.scala")) mustEqual 2 + Eval[Int](file("OnePlusOne.scala")) mustEqual 2 } "apply(new File(...), new File(...))" in { |