commands/plugin: old state files default to 0 for vagrant version

This commit is contained in:
Mitchell Hashimoto 2013-12-04 11:29:17 -08:00
parent 39b2539ec7
commit 236141ba90
2 changed files with 6 additions and 2 deletions

View File

@ -64,7 +64,9 @@ module VagrantPlugins
new_installed = {}
(@data["installed"] || []).each do |plugin|
new_installed[plugin] = {}
new_installed[plugin] = {
"vagrant_version" => "0",
}
end
@data["installed"] = new_installed

View File

@ -61,7 +61,9 @@ describe VagrantPlugins::CommandPlugin::StateFile do
end
it "should have the right installed plugins" do
subject.installed_plugins.keys.should eql(["foo"])
plugins = subject.installed_plugins
expect(plugins.keys).to eql(["foo"])
expect(plugins["foo"]["vagrant_version"]).to eql("0")
end
end
end