vagrant/test/acceptance/support/matchers/match_output.rb

15 lines
473 B
Ruby
Raw Normal View History

2011-12-11 23:53:11 +00:00
require "acceptance/support/output"
# 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