Config JSON doesn't include 'env'
This commit is contained in:
parent
4d3f929b3f
commit
945710e068
|
@ -51,7 +51,7 @@ module Vagrant
|
|||
|
||||
def instance_variables_hash
|
||||
instance_variables.inject({}) do |acc, iv|
|
||||
acc[iv.to_s[1..-1].to_sym] = instance_variable_get(iv)
|
||||
acc[iv.to_s[1..-1].to_sym] = instance_variable_get(iv) unless iv.to_sym == :@env
|
||||
acc
|
||||
end
|
||||
end
|
||||
|
|
|
@ -128,6 +128,12 @@ class ConfigTest < Test::Unit::TestCase
|
|||
@base.expects(:instance_variables_hash).returns(@iv_hash)
|
||||
assert_equal @json, @base.to_json
|
||||
end
|
||||
|
||||
should "not include env in the JSON hash" do
|
||||
@base.env = "FOO"
|
||||
hash = @base.instance_variables_hash
|
||||
assert !hash.has_key?(:env)
|
||||
end
|
||||
end
|
||||
|
||||
context "top config class" do
|
||||
|
|
Loading…
Reference in New Issue