core: use keyword args to simplify BoxCollection#add
This commit is contained in:
parent
9be6b4f0d3
commit
4281af338f
|
@ -70,7 +70,7 @@ module Vagrant
|
|||
# the box represents will be added.
|
||||
# @param [Boolean] force If true, any existing box with the same name
|
||||
# and provider will be replaced.
|
||||
def add(path, name, formats=nil, force=false)
|
||||
def add(path, name, formats=nil, force: false)
|
||||
formats = [formats] if formats && !formats.is_a?(Array)
|
||||
provider = nil
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ describe Vagrant::BoxCollection do
|
|||
|
||||
# Attempt to add the box with the same name
|
||||
box_path = environment.box2_file(prev_box_provider, metadata: { "replaced" => "yes" })
|
||||
box = instance.add(box_path, prev_box_name, nil, true)
|
||||
box = instance.add(box_path, prev_box_name, nil, force: true)
|
||||
box.metadata["replaced"].should == "yes"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue