summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitkataria <ankitkataria28@gmail.com>2018-08-24 20:56:34 +0530
committerankitkataria <ankitkataria28@gmail.com>2018-08-24 20:56:34 +0530
commit663901f9796003e7742d7508cccbe8287bc86906 (patch)
tree6ddb1b6b437469ed65df5ffc102891395f9e3245
parent0f8dd3e0ef53203cd09151e45c57330a948dd571 (diff)
downloadbundler-663901f9796003e7742d7508cccbe8287bc86906.tar.gz
Add test for --gemfile flag
-rw-r--r--spec/commands/exec_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index 5ece0bccc3..9f0a439fc5 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -6,6 +6,16 @@ RSpec.describe "bundle exec" do
system_gems(system_gems_to_install, :path => :bundle_path)
end
+ it "works with --gemfile flag", :focus do
+ create_file "CustomGemfile", <<-G
+ gem "rack"
+ G
+
+ bundle "exec --gemfile CustomGemfile test"
+
+ expect(ENV["BUNDLE_GEMFILE"]).to eq("CustomGemfile")
+ end
+
it "activates the correct gem" do
gemfile <<-G
gem "rack", "0.9.1"