try to get usefull output on error
[opensuse:spacewalk-testsuite-base.git] / features / step_definitions / common_steps.rb
1 # Copyright (c) 2010-2011 Novell, Inc.
2 # Licensed under the terms of the MIT license.
3
4 #
5 # Sleep for X seconds
6 #
7 When /^I wait for "(\d+)" seconds$/ do |arg1|
8   sleep(arg1.to_i)
9 end
10
11 When /^I run rhn_check on this client$/ do
12   output = `rhn_check -vvv 2>&1`
13   if ! $?.success?
14       raise "rhn_check failed: #{$!}: #{output}"
15   end
16 end
17