Sha256: 4e1799eca4668ac0913bfc5dbf9556eea3dc2563880e4ad891c855594800e263
Contents?: true
Size: 474 Bytes
Versions: 6
Compression:
Stored size: 474 Bytes
Contents
require "cli_tester" require "given_filesystem/spec_helpers" ENV["RUN_BY_RSPEC"] = "1" def with_stubbed_binary(bin_path) saved_path = ENV["PATH"] full_path = File.expand_path("../", __FILE__) full_path = File.join(full_path, bin_path) if !File.exist?(full_path) STDERR.puts "Error: stubbing binary #{full_path} does not exist" else path = File.dirname(full_path) ENV["PATH"] = path + ":" + ENV["PATH"] end yield ENV["PATH"] = saved_path end
Version data entries
6 entries across 6 versions & 1 rubygems