Sha256: 1bbcabf93cdb77d356d1cc6bcdefea3967aac30107bf5084c19078722f018650

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

require 'rspec'
require './lib/command.rb'

describe 'Command' do
  it 'should be able to execute: dir' do
    cmd = Command.new('dir')
	cmd.execute
	expect(cmd[:output].empty?).to eq(false)
	expect(cmd[:output].include?('Directory')).to eq(true)
  end

  it 'should fail executing: isnotacommand' do
    cmd = Command.new('isnotacommand')	
	expect { cmd.execute }.to raise_error
	expect(cmd[:error].include?('No such file or directory')).to eq(true)
	expect(cmd[:exit_status]).to_not eq(0)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wixgem-0.33.0 spec/command_spec.rb