Sha256: 2694ca9fbf32e1f649e8c7d4df6a1478c427c4d3391634e694b3e9cc1f3b68c5
Contents?: true
Size: 826 Bytes
Versions: 5
Compression:
Stored size: 826 Bytes
Contents
require 'spec_helper' require 'rubyipmi/ipmitool/errorcodes' describe "Errorcodes" do it 'should return the length of fix hash' do expect(Rubyipmi::Ipmitool::ErrorCodes.length).to be > 1 end it 'should return a hash of codes' do expect(Rubyipmi::Ipmitool::ErrorCodes.code).to be_an_instance_of Hash end it 'should return a fix if code is found' do code = 'Authentication type NONE not supported' expect(Rubyipmi::Ipmitool::ErrorCodes.search(code)).to eq({"I"=>"lanplus"}) end it 'should throw and error if no fix is found' do code = 'Crap Shoot' expect {Rubyipmi::Ipmitool::ErrorCodes.search(code)}.to raise_error end it 'should throw and error when a bad code is given' do code = nil expect {Rubyipmi::Ipmitool::ErrorCodes.search(code)}.to raise_error end end
Version data entries
5 entries across 5 versions & 1 rubygems