Sha256: aa396ee0bb7bf27b63d4b3a25d26d23aac3f8d3bdc439bd36149ecacfcd8f318
Contents?: true
Size: 683 Bytes
Versions: 3
Compression:
Stored size: 683 Bytes
Contents
require 'spec_helper' require 'fedux_org/stdlib/command/run_command' describe Command::RunCommand do context '#run_command' do klass = Class.new do include Command::RunCommand end it 'captures stdout' do result = klass.new.run_command( 'echo hello_world' ) expect( result.stdout.chomp ).to eq( 'hello_world' ) end it 'captures stderr' do result = klass.new.run_command( 'echo hello_world >&2' ) expect( result.stderr.chomp ).to eq( 'hello_world' ) end it 'captures exit status' do result = klass.new.run_command( 'echo hello_world >&2' ) expect( result.status.exitstatus ).to eq( 0 ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fedux_org-stdlib-0.3.2 | spec/command/run_command_spec.rb |
fedux_org-stdlib-0.3.0 | spec/command/run_command_spec.rb |
fedux_org-stdlib-0.2.1 | spec/command/run_command_spec.rb |