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
-
.fail(*options, &b) ⇒ Object
Run the action with expectation command execution fails.
-
.succeed(*options, &b) ⇒ Object
Run the action with expectation command execution succeeds.
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(*, &b) res = execute(, &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(*, &b) res = execute(, &b) res.should.success return res end |