This repository has been archived by the owner on Dec 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xenial is option in vagrant up prompt
- Loading branch information
Showing
8 changed files
with
105 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
|
||
module Vagrant | ||
module Hypconfigmgmt | ||
VERSION = "0.0.7" | ||
VERSION = "0.0.8" | ||
end | ||
end |
Binary file removed
BIN
-52 KB
vagrant/plugins/vagrant-hypconfigmgmt/pkg/vagrant-hypconfigmgmt-0.0.7.gem
Binary file not shown.
Binary file added
BIN
+70 KB
vagrant/plugins/vagrant-hypconfigmgmt/pkg/vagrant-hypconfigmgmt-0.0.8.gem
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
vagrant/plugins/vagrant-hypconfigmgmt/spec/unit/command/get_ubuntu_version_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# -*- encoding: utf-8 -*- | ||
# vim: set fileencoding=utf-8 | ||
|
||
require 'spec_helper' | ||
require "vagrant-hypconfigmgmt/command" | ||
|
||
describe VagrantHypconfigmgmt::Command do | ||
# create a fake app and env to pass into the VagrantHypconfigmgmt::Command constructor | ||
let(:app) { } | ||
let(:env) { { :ui => ui } } | ||
|
||
# pretend env contains the Vagrant ui element | ||
let(:ui) do | ||
double('ui').tap do |ui| | ||
allow(ui).to receive(:info) { nil } | ||
end | ||
end | ||
|
||
|
||
# instantiate class of which a method is to be tested | ||
subject { described_class.new(app, env) } | ||
|
||
# the method that we are going to test | ||
describe "#ubuntu_version" do | ||
|
||
context "when the user inputs ubuntu version precise" do | ||
it "returns ubuntu version precise" do | ||
# check if the setting is prompted for and pretend it returns a "precise" answer | ||
expect(subject).to receive(:get_setting).with( | ||
env, AVAILABLE_UBUNTU_VERSIONS, DEFAULT_UBUNTU_VERSION, | ||
"What Ubuntu version do you want to use? Options: xenial, precise (deprecated) [default #{DEFAULT_UBUNTU_VERSION}]: " | ||
).and_return("precise") | ||
# check a message is printed about the ubuntu version | ||
expect(ui).to receive(:info).once.with(/.*Precise.*deprecated.*/) | ||
# check if the function returns "precise" | ||
expect( subject.get_ubuntu_version(env) ).to eq("precise") | ||
end | ||
end | ||
|
||
context "when the user inputs ubuntu version xenial" do | ||
it "returns ubuntu version xenial" do | ||
# check if the setting is prompted for and pretend it returns a "virtualbox" answer | ||
expect(subject).to receive(:get_setting).with( | ||
env, AVAILABLE_UBUNTU_VERSIONS, DEFAULT_UBUNTU_VERSION, | ||
"What Ubuntu version do you want to use? Options: xenial, precise (deprecated) [default #{DEFAULT_UBUNTU_VERSION}]: " | ||
).and_return("xenial") | ||
# check a message is printed about the ubuntu version | ||
expect(ui).to receive(:info).once.with(/.*Xenial.*default.*/) | ||
# check if the function returns "xenial" | ||
expect( subject.get_ubuntu_version(env) ).to eq("xenial") | ||
end | ||
end | ||
end | ||
end | ||
|