From e76ebceb46ceaee788394900c99b031d8260e582 Mon Sep 17 00:00:00 2001 From: George Dietrich Date: Tue, 12 May 2020 18:18:22 -0400 Subject: [PATCH] Fix now invalid variable name (#60) --- spec/spec_helper.cr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/spec_helper.cr b/spec/spec_helper.cr index 703c1df..c40ff24 100644 --- a/spec/spec_helper.cr +++ b/spec/spec_helper.cr @@ -3,10 +3,10 @@ require "../src/oq" # Runs the the binary with the given *name* and *args*. def run_binary(input : String? = nil, name : String = "bin/oq", args : Array(String) = [] of String, &block : String, Process::Status, String -> Nil) - buffer = IO::Memory.new - error = IO::Memory.new - in = IO::Memory.new - in << input if input - status = Process.run(name, args, output: buffer, input: in.rewind, error: error) - yield buffer.to_s, status, error.to_s + buffer_io = IO::Memory.new + error_io = IO::Memory.new + input_io = IO::Memory.new + input_io << input if input + status = Process.run(name, args, output: buffer_io, input: input_io.rewind, error: error_io) + yield buffer_io.to_s, status, error_io.to_s end