Module: Beaker::CommandFactory
- Includes:
- Test::Unit::Assertions
- Included in:
- Aix::Exec, Aix::File, Aix::Group, Aix::User, Unix::Exec, Unix::File, Unix::Group, Unix::Pkg, Unix::User, Windows::Exec, Windows::File, Windows::Group, Windows::Pkg, Windows::User
- Defined in:
- lib/beaker/command_factory.rb
Instance Method Summary collapse
Instance Method Details
#execute(command, options = {}, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/beaker/command_factory.rb', line 7 def execute(command, ={}, &block) result = self.exec(Command.new(command), ) if block_given? yield result else result.stdout.chomp end end |
#fail_test(msg) ⇒ Object
17 18 19 |
# File 'lib/beaker/command_factory.rb', line 17 def fail_test(msg) assert(false, msg) end |