lib/cuesmash/cucumber.rb in cuesmash-0.4.0 vs lib/cuesmash/cucumber.rb in cuesmash-0.4.1
- old
+ new
@@ -40,24 +40,21 @@
def test
started
status = nil
- Logger.debug "cucumber_command == #{command}"
-
- Open3.popen3 command do |_stdin, out, err, wait_thr|
- [out, err].each do |stream|
+ Open3.popen3(command) do |_stdin, stdout, stderr, wait_thr|
+ [stdout, stderr].each do |stream|
Thread.new do
until (line = stream.gets).nil?
- Logger.info line
+ Logger.info "[Cucumber] #{line}"
end
end
end
-
wait_thr.join
status = wait_thr.value.exitstatus
end
-
+
if status != 0
Logger.info 'Cucumber failed'
status
else
completed