Class: Cuprum::Cli::Dependencies::SystemCommand::Mock
- Inherits:
-
Cuprum::Cli::Dependencies::SystemCommand
- Object
- Cuprum::Cli::Dependencies::SystemCommand
- Cuprum::Cli::Dependencies::SystemCommand::Mock
- Defined in:
- lib/cuprum/cli/dependencies/system_command/mock.rb
Overview
Mock implementation of SystemCommand for testing purposes.
Defined Under Namespace
Classes: MockStatus
Instance Attribute Summary collapse
-
#recorded_commands ⇒ Array<String>
readonly
The commands recorded by the mock service.
Instance Method Summary collapse
-
#initialize(captures: {}) ⇒ Mock
constructor
A new instance of Mock.
Methods inherited from Cuprum::Cli::Dependencies::SystemCommand
Constructor Details
#initialize(captures: {}) ⇒ Mock
Returns a new instance of Mock.
17 18 19 20 21 22 |
# File 'lib/cuprum/cli/dependencies/system_command/mock.rb', line 17 def initialize(captures: {}) super() @captures = captures @recorded_commands = [] end |
Instance Attribute Details
#recorded_commands ⇒ Array<String> (readonly)
Returns the commands recorded by the mock service.
25 26 27 |
# File 'lib/cuprum/cli/dependencies/system_command/mock.rb', line 25 def recorded_commands @recorded_commands end |