diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-07-26 13:53:08 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-07-27 10:55:01 -0500 |
commit | fd9f977571b3bb2d5e8086224e7a024876a9e548 (patch) | |
tree | e3f21f8c0653beee01db00a88f77942555338d31 /spec/bundler/env_spec.rb | |
parent | 92f7781eda8e429a189c1d2ebc642ec4f8febdbf (diff) | |
download | bundler-fd9f977571b3bb2d5e8086224e7a024876a9e548.tar.gz |
[Env] Print all gemfiles that have been evaledseg-env-eval-gemfile
Diffstat (limited to 'spec/bundler/env_spec.rb')
-rw-r--r-- | spec/bundler/env_spec.rb | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/spec/bundler/env_spec.rb b/spec/bundler/env_spec.rb index 10b6ae1503..fbb7ec3c22 100644 --- a/spec/bundler/env_spec.rb +++ b/spec/bundler/env_spec.rb @@ -82,6 +82,54 @@ RSpec.describe Bundler::Env do end end + context "when eval_gemfile is used" do + it "prints all gemfiles" do + create_file "other/Gemfile-other", "gem 'rack'" + create_file "other/Gemfile", "eval_gemfile 'Gemfile-other'" + create_file "Gemfile-alt", <<-G + source "file:#{gem_repo1}" + eval_gemfile "other/Gemfile" + G + gemfile "eval_gemfile #{File.expand_path("Gemfile-alt").dump}" + + output = described_class.report(:print_gemspecs => true) + expect(output).to include(strip_whitespace(<<-ENV)) + ## Gemfile + + ### Gemfile + + ```ruby + eval_gemfile #{File.expand_path("Gemfile-alt").dump} + ``` + + ### Gemfile-alt + + ```ruby + source "file:#{gem_repo1}" + eval_gemfile "other/Gemfile" + ``` + + ### other/Gemfile + + ```ruby + eval_gemfile 'Gemfile-other' + ``` + + ### other/Gemfile-other + + ```ruby + gem 'rack' + ``` + + ### Gemfile.lock + + ``` + <No #{bundled_app("Gemfile.lock")} found> + ``` + ENV + end + end + context "when the git version is OS specific" do it "includes OS specific information with the version number" do expect(git_proxy_stub).to receive(:git).with("--version"). |