features/support/command_line.rb in mirage-3.0.10 vs features/support/command_line.rb in mirage-3.0.11
- old
+ new
@@ -1,16 +1,20 @@
require 'tempfile'
+require 'wait_methods'
+
module CommandLine
+ include Mirage::WaitMethods
+
def run command
output = Tempfile.new("child")
Dir.chdir SCRATCH do
process = ChildProcess.build(*("#{command}".split(' ')))
process.detach
process.io.stdout = output
process.io.stderr = output
process.start
- wait_until(:timeout_after => 30.seconds) { process.exited? }
+ wait_until(:timeout_after => 30) { process.exited? }
end
File.read(output.path)
end
def normalise text
@@ -28,6 +32,6 @@
end
end
end
World CommandLine
-include CommandLine
\ No newline at end of file
+include CommandLine