lib/aruba/api/core.rb in aruba-0.14.3 vs lib/aruba/api/core.rb in aruba-0.14.4
- old
+ new
@@ -23,12 +23,12 @@
# Clean the working directory of aruba
#
# This will only clean up aruba's working directory to remove all
# artifacts of your tests. This does NOT clean up the current working
# directory.
- def setup_aruba
- Aruba::Setup.new(aruba).call
+ def setup_aruba(clobber = true)
+ Aruba::Setup.new(aruba).call(clobber)
self
end
# Switch to directory
@@ -161,10 +161,11 @@
fail ArgumentError, %(Expanding "~/" to a relative path "#{path}" is not allowed) unless path.absolute?
path.to_s
else
directory = File.join(aruba.root_directory, aruba.current_directory)
- ArubaPath.new(File.join(*[directory, dir_string, file_name].compact)).expand_path.to_s
+ directory = File.expand_path(dir_string, directory) if dir_string
+ File.expand_path(file_name, directory)
end
end
# rubocop:enable Metrics/MethodLength
# rubocop:enable Metrics/CyclomaticComplexity