2011-12-03 15:44:08 -08:00

25 lines
519 B
Ruby

require "test_helper"
class SetEnvActionTest < Test::Unit::TestCase
setup do
@klass = Vagrant::Action::Env::Set
@app, @env = action_env
@env.clear
end
should "merge in the given options" do
@klass.new(@app, @env, :foo => :bar)
assert_equal :bar, @env[:foo]
end
should "not merge in anything if not given" do
@klass.new(@app, @env)
assert @env.empty?
end
should "just continue the chain" do
@app.expects(:call).with(@env)
@klass.new(@app, @env).call(@env)
end
end