diff --git a/spec/apex/encoder/aprs_kiss_spec.rb b/spec/apex/encoder/aprs_kiss_spec.rb index 747a38f52b3f94c4645d710551f87980c5dc4584..16ba887b0d99efca81a208e89a234304d60ca6de 100644 --- a/spec/apex/encoder/aprs_kiss_spec.rb +++ b/spec/apex/encoder/aprs_kiss_spec.rb @@ -1,13 +1,6 @@ require_relative '../../../lib/apex/encoder/aprs_kiss' require_relative '../../../lib/apex/frame' -# DECODED_FRAME_KISS = Apex::Frame::Frame.new( -# Apex::Frame::Entity.from_raw('W2GMD-1'), -# Apex::Frame::Entity.from_raw('OMG'), -# Apex::Frame::Path.from_raw(['WIDE1-1', 'WIDE2-2']), -# 'test_encode_frame' -# ) - FRAME_KISS = Apex::Frame::Frame.new( Apex::Frame::Entity.from_raw('W2GMD-1'), Apex::Frame::Entity.from_raw('OMG'), @@ -21,14 +14,6 @@ FRAME_MAP = { :path => ['WIDE1-1', 'WIDE2-2'], :payload => 'test_encode_frame' } -# ENCODED_FRAME_KISS = [158, 154, 142, 64, 64, 64, 96, 174, 100, 142, 154, 136, 64, 98, 174, 146, 136, 138, 98, -# 64, 98, 174, 146, 136, 138, 100, 64, 101, 3, 240, 116, 101, 115, 116, 95, 101, 110, 99, 111, 100, -# 101, 95, 102, 114, 97, 109, 101] -# -# ENCODED_FRAME_KISS_INVALID = [166, 110, 168, 166, 170, 172, 96, 150, 142, 108, 174, 168, 140, 96, 154, 168, 158, -# 166, 158, 64, 100, 174, 146, 136, 138, 100, 226, 130, 164, 224, 150, 140, 108, 140, 146, 164, -# 117, 3, 240, 96, 49, 55, 69, 108, 35, 88, 45, 47, 107, 103, 54, 119, 116, 102, 64, 103, 111, -# 115, 115, 101, 108, 105, 110, 102, 97, 109, 105, 108, 121, 46, 99, 111, 109] describe Apex::AprsKiss do diff --git a/spec/apex/frame/path_spec.rb b/spec/apex/frame/path_spec.rb index fafb73fa3bf06271e9cc8973f8dabbfd70c96687..d0c2149db66d7fcc82ab977eb7ad4534d9f16a50 100644 --- a/spec/apex/frame/path_spec.rb +++ b/spec/apex/frame/path_spec.rb @@ -214,4 +214,13 @@ describe Apex::Frame::Path do end end end + + describe ".to_string_array" do + context "Given a valid path with two hops" do + let(:path) {Apex::Frame::Path.from_raw("WIDE2-2,WI2ARD")} + it "do" do + expect(path.to_string_array).to eql(["WIDE2-2", "WI2ARD"]) + end + end + end end