File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ def nondevelopment_dependencies
259259 end
260260
261261 def installation_missing?
262- !default_gem? && ! File . directory ?( full_gem_path )
262+ !default_gem? && ( ! Dir . exist ?( full_gem_path ) || Dir . empty? ( full_gem_path ) )
263263 end
264264
265265 unless VALIDATES_FOR_RESOLUTION
Original file line number Diff line number Diff line change 100100 gem 'myrack'
101101 G
102102
103- FileUtils . rm_rf ( default_bundle_path ( "gems/myrack-1.0.0" ) )
103+ gem_dir = default_bundle_path ( "gems/myrack-1.0.0" )
104+
105+ FileUtils . rm_rf ( gem_dir )
104106
105107 bundle "install --verbose"
106108
107109 expect ( out ) . to include ( "Installing myrack 1.0.0" )
108- expect ( default_bundle_path ( "gems/myrack-1.0.0" ) ) . to exist
110+ expect ( gem_dir ) . to exist
111+ expect ( the_bundle ) . to include_gems ( "myrack 1.0.0" )
112+
113+ FileUtils . rm_rf ( gem_dir )
114+ Dir . mkdir ( gem_dir )
115+
116+ bundle "install --verbose"
117+
118+ expect ( out ) . to include ( "Installing myrack 1.0.0" )
119+ expect ( gem_dir ) . to exist
109120 expect ( the_bundle ) . to include_gems ( "myrack 1.0.0" )
110121 end
111122
You can’t perform that action at this time.
0 commit comments