2011-12-11 23:53:11 +00:00
|
|
|
require "acceptance/support/output"
|
2011-11-09 07:03:15 +00:00
|
|
|
|
|
|
|
# This creates a matcher that is used to match against certain
|
|
|
|
# Vagrant output. Vagrant output is not what is being tested,
|
|
|
|
# so all that state is hidden away in Acceptance::Output.
|
|
|
|
RSpec::Matchers.define :match_output do |expected, *args|
|
|
|
|
match do |actual|
|
|
|
|
Acceptance::Output.new(actual).send(expected, *args)
|
|
|
|
end
|
|
|
|
|
|
|
|
failure_message_for_should do |actual|
|
|
|
|
"expected output to match: #{expected} #{args.inspect}"
|
|
|
|
end
|
|
|
|
end
|