Module: Pione::TestHelper::Command

Defined in:
lib/pione/test-helper/command-helper.rb

Overview

This module helps tests of command execution.

Class Method Summary collapse

Class Method Details

.fail(*options, &b) ⇒ Object

Run the action with expectation command execution fails.



48
49
50
51
52
# File 'lib/pione/test-helper/command-helper.rb', line 48

def fail(*options, &b)
  res = execute(options, &b)
  res.should.not.success
  return res
end

.succeed(*options, &b) ⇒ Object

Run the action with expectation command execution succeeds.



41
42
43
44
45
# File 'lib/pione/test-helper/command-helper.rb', line 41

def succeed(*options, &b)
  res = execute(options, &b)
  res.should.success
  return res
end