Method: ChefSpec::API::Stubs#stub_command
- Defined in:
- lib/chefspec/api/stubs.rb
#stub_command(command, &block) ⇒ ChefSpec::CommandStub
Stub a shell command to return a particular value without shelling out to the system.
26 27 28 |
# File 'lib/chefspec/api/stubs.rb', line 26 def stub_command(command, &block) ChefSpec::Stubs::CommandRegistry.register(ChefSpec::Stubs::CommandStub.new(command, &block)) end |