module RSpecCommand::ClassMethods
def command(cmd=nil, options={}, &block)
(**options)
-
allow_error
(Boolean
) -- If true, don't raise an error on
Parameters:
-
block
(Proc
) -- Optional block to return a command to run. -
options
(Hash
) -- Options to pass to -
cmd
(String, Array
) -- Command to run. If passed as an array, no shell
Other tags:
- See: #command -
def command(cmd=nil, options={}, &block) metadata[:command] = true subject do |example| # If a block is given, use it to get the command. cmd = instance_eval(&block) if block command(cmd, options) end end