File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22BUNDLE_FROZEN: "true"
33BUNDLE_PATH: "vendor/bundle"
44BUNDLE_DISABLE_SHARED_GEMS: "1"
5+ BUNDLE_DEPLOYMENT: "false"
Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ def use_config(&block)
2222 @extra_config = block
2323 end
2424
25+ def bundle ( *args )
26+ `cd #{ Dir . pwd } && #{ RUBY_EXE } -S bundle _#{ ::Bundler ::VERSION } _ #{ args . join ( ' ' ) } `
27+ end
28+
2529 def bundle_install ( *args )
26- `cd #{ Dir . pwd } && #{ RUBY_EXE } -S bundle install #{ args . join ( ' ' ) } `
30+ bundle ( 'install' , * args )
2731 end
2832
2933 let ( :config ) { drbclient . config ( @extra_config ) }
@@ -233,13 +237,21 @@ def bundle_install(*args)
233237 context "when deployment" do
234238 run_in_directory "spec/sample_bundler"
235239
240+ before do
241+ bundle 'config' , 'deployment' , 'true'
242+ end
243+
236244 it "includes the bundler gem" do
237- bundle_install '--deployment'
245+ bundle_install
238246 jar . apply ( config )
239247 expect ( file_list ( %r{gems/rake-13.3.0/lib} ) ) . to_not be_empty
240248 expect ( file_list ( %r{gems/bundler-} ) ) . to_not be_empty
241249 expect ( file_list ( %r{gems/bundler-.*/exe} ) ) . to_not be_empty
242250 end
251+
252+ after do
253+ bundle 'config' , 'deployment' , 'false'
254+ end
243255 end
244256
245257 context "in a rack app" do
You can’t perform that action at this time.
0 commit comments