Created
September 22, 2009 01:56
-
-
Save purp/190726 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cucumber/features/support/env.rb lines 83-96 | |
def run(command) | |
stderr_file = Tempfile.new('cucumber') | |
stderr_file.close | |
in_current_dir do | |
@last_stdout = `#{command} 2> #{stderr_file.path}` | |
mode = Cucumber::RUBY_1_9 ? {:external_encoding=>"UTF-8"} : 'r' | |
IO.popen("#{command} 2> #{stderr_file.path}", mode) do |io| | |
@last_stdout = io.read | |
end | |
@last_exit_status = $?.exitstatus | |
end | |
@last_stderr = IO.read(stderr_file.path) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment