spec/packets/parsers/processor_parser_spec.rb in cosmos-3.5.3 vs spec/packets/parsers/processor_parser_spec.rb in cosmos-3.6.0
- old
+ new
@@ -26,11 +26,11 @@
it "complains if a current packet is not defined" do
# Check for missing TELEMETRY line
tf = Tempfile.new('unittest')
tf.puts('PROCESSOR')
tf.close
- expect { @pc.process_file(tf.path, "SYSTEM") }.to raise_error(ConfigParser::Error, "No current packet for PROCESSOR")
+ expect { @pc.process_file(tf.path, "SYSTEM") }.to raise_error(ConfigParser::Error, /No current packet for PROCESSOR/)
tf.unlink
end
it "complains if there are not enough parameters" do
tf = Tempfile.new('unittest')
@@ -103,10 +103,10 @@
it "complains if applied to a command packet" do
tf = Tempfile.new('unittest')
tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Packet"'
tf.puts ' PROCESSOR P1 processor1.rb'
tf.close
- expect { @pc.process_file(tf.path, "TGT1") }.to raise_error(ConfigParser::Error, "PROCESSOR only applies to telemetry packets")
+ expect { @pc.process_file(tf.path, "TGT1") }.to raise_error(ConfigParser::Error, /PROCESSOR only applies to telemetry packets/)
tf.unlink
end
end
end