Module: Boxes::Testing::Command

Defined in:
lib/boxes/testing/command.rb

Defined Under Namespace

Classes: Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



4
5
6
# File 'lib/boxes/testing/command.rb', line 4

def response
  @response
end

Instance Method Details

#run_command(cmd) ⇒ Object



6
7
8
9
10
# File 'lib/boxes/testing/command.rb', line 6

def run_command(cmd)
  stdout = `#{cmd}`

  @response = Response.new(cmd, stdout, $?.exitstatus)
end