From 6e2185a1a7b28f9cb220e40ff710c2f08a98c541 Mon Sep 17 00:00:00 2001 From: David Marcin Date: Thu, 3 Sep 2020 15:38:44 -0700 Subject: [PATCH] Add test that load_env_plugins is called --- bundler/spec/commands/install_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bundler/spec/commands/install_spec.rb b/bundler/spec/commands/install_spec.rb index 0d17e7900eaf..6295ef6c0c96 100644 --- a/bundler/spec/commands/install_spec.rb +++ b/bundler/spec/commands/install_spec.rb @@ -432,6 +432,17 @@ gem 'foo' G end + + it "loads env plugins" do + plugin_msg = "hello from an env plugin!" + create_file "plugins/rubygems_plugin.rb", "puts '#{plugin_msg}'" + gemfile = <<-G + source "#{file_uri_for(gem_repo1)}" + gem "rack" + G + out = install_gemfile gemfile, :env => { "RUBYLIB" => bundled_app("plugins/").to_s } + expect(out).to include(plugin_msg) + end end describe "Ruby version in Gemfile.lock" do