diff --git a/lib/ruby_maven.rb b/lib/ruby_maven.rb index 9dc5596..2b2628e 100644 --- a/lib/ruby_maven.rb +++ b/lib/ruby_maven.rb @@ -69,7 +69,7 @@ def self.launch( *args ) ENV['M2_HOME'] = Maven.home extensions = File.join( '.mvn/extensions.xml' ) - if has_extensions = File.exists?( extensions ) + if has_extensions = File.exist?( extensions ) # tests need copy instead of move FileUtils.cp( extensions, extensions + ".orig" ) else diff --git a/spec/ruby_maven_spec.rb b/spec/ruby_maven_spec.rb index c33447f..9b3fc22 100644 --- a/spec/ruby_maven_spec.rb +++ b/spec/ruby_maven_spec.rb @@ -29,9 +29,9 @@ RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=9.3.0.0' ) end _(out).must_match /mvn -Dverbose package/ - _(File.exists?( gem_name )).must_equal true - _(File.exists?( '.mvn/extensions.xml' )).must_equal true - _(File.exists?( '.mvn/extensions.xml.orig' )).wont_equal true + _(File.exist?( gem_name )).must_equal true + _(File.exist?( '.mvn/extensions.xml' )).must_equal true + _(File.exist?( '.mvn/extensions.xml.orig' )).wont_equal true end end