diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-11-26 22:27:17 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-11-26 22:27:17 +0100 |
commit | aac6e6da67395178edb34ed9fd0cd6279f8cc579 (patch) | |
tree | 799abcbb38934f05d5ad1151e6ed371266d5b55f /spec/support | |
parent | 3e54fbc7b1e28e25eaac465a825cdd16facfe999 (diff) | |
download | bundler-aac6e6da67395178edb34ed9fd0cd6279f8cc579.tar.gz |
Lazily load `open3`
Since it's a default gem now, it's better to load it as late as
possible.
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index d085b769d7..95c2d60d56 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require "open3" - require_relative "command_execution" require_relative "the_bundle" @@ -211,6 +209,7 @@ module Spec env = env.map {|k, v| [k.to_s, v.to_s] }.to_h # convert env keys and values to string + require "open3" Open3.popen3(env, cmd.to_s) do |stdin, stdout, stderr, wait_thr| yield stdin, stdout, wait_thr if block_given? stdin.close |