Sha256: 39b630d21e48993c54f161118935c7565c1fcfee774107458daed08904da9c4d
Contents?: true
Size: 686 Bytes
Versions: 12
Compression:
Stored size: 686 Bytes
Contents
require 'spec_helper' RSpec.describe Aruba::Platforms::WindowsCommandString do let(:command_string) { described_class.new(base_command) } let(:cmd_path) { 'C:\Some Path\cmd.exe' } before do allow(Aruba.platform).to receive(:which).with('cmd.exe').and_return(cmd_path) end describe '#to_a' do context 'with a command with a path' do let(:base_command) { 'C:\Foo\Bar' } it { expect(command_string.to_a).to eq [cmd_path, '/c', base_command] } end context 'with a command with a path containing spaces' do let(:base_command) { 'C:\Foo Bar\Baz' } it { expect(command_string.to_a).to eq [cmd_path, '/c', base_command] } end end end
Version data entries
12 entries across 12 versions & 2 rubygems