Comments on the Output class
This commit is contained in:
parent
bb09b249b6
commit
66761ae3ff
|
@ -6,22 +6,29 @@ module Acceptance
|
||||||
@text = text
|
@text = text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Checks that an error message was outputted about the box
|
||||||
|
# being added being invalid.
|
||||||
def box_invalid
|
def box_invalid
|
||||||
@text =~ /^The box file you're attempting to add is invalid./
|
@text =~ /^The box file you're attempting to add is invalid./
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Checks that an error message was outputted about the path
|
||||||
|
# not existing to the box.
|
||||||
def box_path_doesnt_exist
|
def box_path_doesnt_exist
|
||||||
@text =~ /^The specified path to a file doesn't exist.$/
|
@text =~ /^The specified path to a file doesn't exist.$/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Tests that the box with given name is installed.
|
||||||
def box_installed(name)
|
def box_installed(name)
|
||||||
@text =~ /^foo$/
|
@text =~ /^#{name}$/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Tests that the output says there are no installed boxes.
|
||||||
def no_boxes
|
def no_boxes
|
||||||
@text =~ /There are no installed boxes!/
|
@text =~ /There are no installed boxes!/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Tests that the output contains a specific Vagrant version.
|
||||||
def is_version?(version)
|
def is_version?(version)
|
||||||
@text =~ /^Vagrant version #{version}$/
|
@text =~ /^Vagrant version #{version}$/
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue