Sha256: 0d9c0031b2a40cdea9d1bbf8abd585671dba3cacce95e9b7a39c91b98471e6e0
Contents?: true
Size: 687 Bytes
Versions: 120
Compression:
Stored size: 687 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'fedux_org_stdlib/command/run_command' RSpec.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
120 entries across 120 versions & 1 rubygems