spec/louis_spec.rb in louis-2.0.7 vs spec/louis_spec.rb in louis-2.0.8

- old
+ new

@@ -3,34 +3,34 @@ RSpec.describe Louis do it 'has a version number' do expect(Louis::VERSION).not_to be nil end - it "it should have its source data file" do + it 'it should have its source data file' do expect(File.readable?(Louis::ORIGINAL_OUI_FILE)).to be(true) end - it "it should have its parsed data file" do + it 'it should have its parsed data file' do expect(File.readable?(Louis::PARSED_DATA_FILE)).to be(true) end describe 'Original OUI format regex' do subject { Louis::OUI_FORMAT_REGEX } - it "should ignore comment lines" do - comment_line = "# This is just a sample of what a comment might look like" + it 'should ignore comment lines' do + comment_line = '# This is just a sample of what a comment might look like' expect(subject).to_not match(comment_line) end - it "should ignore blank lines" do - expect(subject).to_not match("") + it 'should ignore blank lines' do + expect(subject).to_not match('') end end # The core of the whole library describe '#lookup' do - let(:base_mac) { '00:12:34:00:00:00' } + let(:base_mac) { '08:94:ef:00:00:00' } let(:partial_mac) { '3c:97:0e' } let(:unknown_mac) { 'c5:00:00:00:00:00' } let(:local_mac) { '3e:97:0e' } let(:multicast_mac) { '3d:97:0e' } let(:multi_match_mac) { 'E4:95:6E:40:00:00'} @@ -51,11 +51,13 @@ it 'should be able to identify the long vendor of a full MAC' do expect(Louis.lookup(base_mac)['long_vendor']).to eq('Camille Bauer') end - it 'should be able to identify the short vendor of a partial MAC' do + it 'should be able to identify the short vendor of a partial MAC', :focus do + puts partial_mac + puts Louis.lookup(partial_mac).inspect expect(Louis.lookup(partial_mac)['short_vendor']).to eq('WistronI') end it 'should be able to identify the long vendor of a patrial MAC' do expect(Louis.lookup(partial_mac)['long_vendor']).to eq('Wistron InfoComm(Kunshan)Co.,Ltd.') @@ -82,11 +84,11 @@ expect(Louis.lookup(multi_match_mac)['long_vendor']).to eq(most_specific_match) end end # For future reference, these may change and are depedent on the - # specifications in the data file. This of these as the slash-suffixes that - # describe a network /24 for example. + # specifications in the data file. These are the slash-suffixes that describe + # a the relevant bits in the prefix /24 for example. describe '#mask_keys' do it 'should return a list of integers: [36, 28, 24]' do expect(Louis.mask_keys).to eq([36, 28, 24]) end end