You can no longer set env vars on Builders via `use`
This commit is contained in:
parent
90517a0f9b
commit
556a53d48d
|
@ -32,11 +32,6 @@ module Vagrant
|
|||
#
|
||||
# @param [Class] middleware The middleware class
|
||||
def use(middleware, *args, &block)
|
||||
# Prepend with a environment setter if args are given
|
||||
if !args.empty? && args.first.is_a?(Hash) && middleware != Env::Set
|
||||
self.use(Env::Set, args.shift, &block)
|
||||
end
|
||||
|
||||
if middleware.kind_of?(Builder)
|
||||
# Merge in the other builder's stack into our own
|
||||
self.stack.concat(middleware.stack)
|
||||
|
|
|
@ -50,18 +50,6 @@ describe Vagrant::Action::Builder do
|
|||
two.call(data)
|
||||
data[:one].should == true
|
||||
end
|
||||
|
||||
it "should be able to set additional variables when using" do
|
||||
data = { }
|
||||
proc1 = Proc.new { |env| env[:data] += 1 }
|
||||
|
||||
# Build the first builder
|
||||
one = described_class.new
|
||||
one.use proc1, :data => 5
|
||||
one.call(data)
|
||||
|
||||
data[:data].should == 6
|
||||
end
|
||||
end
|
||||
|
||||
context "inserting" do
|
||||
|
|
Loading…
Reference in New Issue