vaguerent/test/acceptance/version_test.rb
Mitchell Hashimoto bb09b249b6 Use output helpers instead of direct regex's in tests.
We're not trying to test the format of the output, we're trying
to test the meaning of the output, so hide that state away in
another class.
2011-11-05 14:59:17 -07:00

22 lines
692 B
Ruby

require File.expand_path("../base", __FILE__)
class VersionTest < AcceptanceTest
should "print the version to stdout" do
result = execute("vagrant", "version")
assert(output(result.stdout).is_version?(config.vagrant_version),
"output should be version")
end
should "print the version with '-v'" do
result = execute("vagrant", "-v")
assert(output(result.stdout).is_version?(config.vagrant_version),
"output should be version")
end
should "print the version with '--version'" do
result = execute("vagrant", "--version")
assert(output(result.stdout).is_version?(config.vagrant_version),
"output should be version")
end
end