On 12 Apr 2008, at 11:51, Edvard Majakari wrote:
> How about something along the lines
>
> cd project_dir do
> @stdout, @stdterr = capture_outputs("#{migrate} #{args}")
> end
>
> ...
> def capture_outputs(cmd)
> stderr_log = "/tmp" + "/#{$0}-{$$}.log"
> out = `cmd 2> #{stderr_log}`
> err = File.read(stderr_log) if File.exist? stderr_log
> [out, err]
> end
>
> Totally untested, but hopefully you get the idea?
Yeah! Don't know why I didn't think of just sending stderr to a log
file myself...
Thanks
Ashley
--
http://www.patchspace.co.uk/
http://aviewfromafar.net/
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users