uh-wm/features/steps/output_steps.rb
2015-04-13 01:56:08 +00:00

25 lines
717 B
Ruby

Then /^the output must contain exactly the usage$/ do
assert_exact_output <<-eoh, all_output
Usage: uhwm [options]
options:
-h, --help print this message
-v, --version enable verbose mode
-d, --debug enable debug mode
-r, --require PATH require ruby feature
-l, --layout LAYOUT specify layout
eoh
end
Then /^the output must match \/([^\/]+)\/([a-z]*)$/ do |pattern, options|
uhwm_wait_output Regexp.new(pattern, options)
end
Then /^the output must contain:$/ do |content|
uhwm_wait_output content.to_s
end
Then /^the output must contain current display$/ do
uhwm_wait_output ENV['DISPLAY']
end