Complete the test (still failing)
This commit is contained in:
parent
d71a78eacf
commit
bac87f2478
|
@ -2,6 +2,8 @@ module Acceptance
|
||||||
# This class helps with matching against output so that every
|
# This class helps with matching against output so that every
|
||||||
# test isn't inherently tied to the output format of Vagrant.
|
# test isn't inherently tied to the output format of Vagrant.
|
||||||
class Output
|
class Output
|
||||||
|
DEFAULT_VM = "default"
|
||||||
|
|
||||||
def initialize(text)
|
def initialize(text)
|
||||||
@text = text
|
@text = text
|
||||||
end
|
end
|
||||||
|
@ -63,8 +65,8 @@ module Acceptance
|
||||||
|
|
||||||
# This checks that the "up" output properly contains text showing that
|
# This checks that the "up" output properly contains text showing that
|
||||||
# it is downloading the box during the up process.
|
# it is downloading the box during the up process.
|
||||||
def up_fetching_box(name)
|
def up_fetching_box(name, vm=DEFAULT_VM)
|
||||||
@text =~ /Box #{name} was not found. Fetching box from specified URL...$/
|
@text =~ /^[#{vm}] Box #{name} was not found. Fetching box from specified URL...$/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,6 +31,10 @@ end
|
||||||
VFILE
|
VFILE
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Bring up the environment, which should work. `machine1` should download
|
||||||
|
# the box while `machine2` doesn't.
|
||||||
result = assert_execute("vagrant", "up")
|
result = assert_execute("vagrant", "up")
|
||||||
|
result.stdout.should match_output(:up_fetching_box, "base", "machine1")
|
||||||
|
result.stdout.should_not match_output(:up_fetching_box, "base", "machine2")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue