cosmos 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +195 -0
  3. data/README.md +3 -3
  4. data/data/crc.txt +52 -52
  5. data/lib/cosmos.rb +1 -1
  6. data/lib/cosmos/core_ext/time.rb +11 -9
  7. data/lib/cosmos/gui/choosers/telemetry_chooser.rb +0 -2
  8. data/lib/cosmos/gui/dialogs/about_dialog.rb +2 -2
  9. data/lib/cosmos/gui/dialogs/exception_dialog.rb +2 -2
  10. data/lib/cosmos/gui/dialogs/progress_dialog.rb +11 -5
  11. data/lib/cosmos/gui/dialogs/splash.rb +32 -10
  12. data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +1 -1
  13. data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +2 -2
  14. data/lib/cosmos/gui/qt.rb +22 -22
  15. data/lib/cosmos/io/json_drb.rb +4 -4
  16. data/lib/cosmos/io/json_rpc.rb +21 -21
  17. data/lib/cosmos/packet_logs/packet_log_writer.rb +18 -20
  18. data/lib/cosmos/packets/commands.rb +8 -6
  19. data/lib/cosmos/packets/limits.rb +3 -2
  20. data/lib/cosmos/packets/packet.rb +14 -11
  21. data/lib/cosmos/packets/parsers/limits_parser.rb +1 -1
  22. data/lib/cosmos/packets/parsers/macro_parser.rb +4 -4
  23. data/lib/cosmos/packets/parsers/state_parser.rb +1 -1
  24. data/lib/cosmos/packets/structure.rb +2 -2
  25. data/lib/cosmos/packets/telemetry.rb +5 -4
  26. data/lib/cosmos/script/script.rb +6 -6
  27. data/lib/cosmos/streams/tcpip_socket_stream.rb +2 -1
  28. data/lib/cosmos/streams/template_stream_protocol.rb +1 -1
  29. data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +1 -1
  30. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +5 -8
  31. data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +4 -3
  32. data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +9 -3
  33. data/lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb +15 -11
  34. data/lib/cosmos/tools/data_viewer/data_viewer.rb +1 -1
  35. data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +2 -2
  36. data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +2 -2
  37. data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +0 -2
  38. data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +1 -1
  39. data/lib/cosmos/tools/replay/replay.rb +2 -2
  40. data/lib/cosmos/tools/script_runner/script_audit.rb +1 -1
  41. data/lib/cosmos/tools/script_runner/script_runner.rb +1 -1
  42. data/lib/cosmos/tools/script_runner/script_runner_frame.rb +3 -7
  43. data/lib/cosmos/tools/table_manager/table_config.rb +1 -1
  44. data/lib/cosmos/tools/test_runner/results_writer.rb +1 -1
  45. data/lib/cosmos/tools/test_runner/test_runner.rb +2 -2
  46. data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +2 -1
  47. data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +1 -1
  48. data/lib/cosmos/tools/tlm_grapher/data_object_adders/xy_data_object_adder.rb +1 -0
  49. data/lib/cosmos/tools/tlm_grapher/data_object_editors/housekeeping_data_object_editor.rb +1 -0
  50. data/lib/cosmos/tools/tlm_grapher/data_object_editors/xy_data_object_editor.rb +1 -0
  51. data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +3 -3
  52. data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +1 -3
  53. data/lib/cosmos/top_level.rb +2 -6
  54. data/lib/cosmos/utilities/ruby_lex_utils.rb +1 -1
  55. data/lib/cosmos/version.rb +5 -5
  56. data/lib/cosmos/win32/win32_main.rb +11 -7
  57. data/spec/ccsds/ccsds_packet_spec.rb +28 -28
  58. data/spec/ccsds/ccsds_parser_spec.rb +27 -27
  59. data/spec/config/config_parser_spec.rb +88 -88
  60. data/spec/conversions/conversion_spec.rb +3 -3
  61. data/spec/conversions/generic_conversion_spec.rb +9 -9
  62. data/spec/conversions/new_packet_log_conversion_spec.rb +4 -4
  63. data/spec/conversions/polynomial_conversion_spec.rb +7 -7
  64. data/spec/conversions/processor_conversion_spec.rb +9 -9
  65. data/spec/conversions/received_count_conversion_spec.rb +7 -7
  66. data/spec/conversions/received_time_formatted_conversion_spec.rb +9 -9
  67. data/spec/conversions/received_time_seconds_conversion_spec.rb +9 -9
  68. data/spec/conversions/segmented_polynomial_conversion_spec.rb +11 -11
  69. data/spec/conversions/unix_time_formatted_conversion_spec.rb +13 -13
  70. data/spec/conversions/unix_time_seconds_conversion_spec.rb +13 -13
  71. data/spec/core_ext/array_spec.rb +76 -76
  72. data/spec/core_ext/class_spec.rb +3 -3
  73. data/spec/core_ext/cosmos_io_spec.rb +16 -16
  74. data/spec/core_ext/exception_spec.rb +19 -19
  75. data/spec/core_ext/file_spec.rb +16 -16
  76. data/spec/core_ext/hash_spec.rb +3 -3
  77. data/spec/core_ext/io_spec.rb +2 -2
  78. data/spec/core_ext/kernel_spec.rb +2 -2
  79. data/spec/core_ext/math_spec.rb +43 -43
  80. data/spec/core_ext/matrix_spec.rb +22 -22
  81. data/spec/core_ext/objectspace_spec.rb +6 -6
  82. data/spec/core_ext/range_spec.rb +2 -2
  83. data/spec/core_ext/socket_spec.rb +4 -4
  84. data/spec/core_ext/string_spec.rb +67 -67
  85. data/spec/core_ext/stringio_spec.rb +2 -2
  86. data/spec/core_ext/time_spec.rb +82 -82
  87. data/spec/gui/line_graph/line_clip_spec.rb +34 -34
  88. data/spec/interfaces/interface_spec.rb +46 -46
  89. data/spec/interfaces/linc_interface_spec.rb +26 -26
  90. data/spec/interfaces/serial_interface_spec.rb +16 -16
  91. data/spec/interfaces/simulated_target_interface_spec.rb +21 -21
  92. data/spec/interfaces/stream_interface_spec.rb +22 -22
  93. data/spec/interfaces/tcpip_client_interface_spec.rb +14 -14
  94. data/spec/interfaces/tcpip_server_interface_spec.rb +41 -41
  95. data/spec/interfaces/udp_interface_spec.rb +46 -46
  96. data/spec/io/buffered_file_spec.rb +50 -50
  97. data/spec/io/io_multiplexer_spec.rb +9 -9
  98. data/spec/io/json_drb_object_spec.rb +7 -7
  99. data/spec/io/json_drb_spec.rb +55 -55
  100. data/spec/io/json_rpc_spec.rb +68 -68
  101. data/spec/io/raw_logger_pair_spec.rb +28 -28
  102. data/spec/io/raw_logger_spec.rb +22 -22
  103. data/spec/io/serial_driver_spec.rb +3 -3
  104. data/spec/io/stderr_spec.rb +2 -2
  105. data/spec/io/stdout_spec.rb +2 -2
  106. data/spec/io/tcpip_server_spec.rb +62 -62
  107. data/spec/io/udp_sockets_spec.rb +19 -19
  108. data/spec/io/win32_serial_driver_spec.rb +10 -10
  109. data/spec/packet_logs/meta_packet_log_writer_spec.rb +32 -32
  110. data/spec/packet_logs/packet_log_reader_spec.rb +138 -138
  111. data/spec/packet_logs/packet_log_writer_pair_spec.rb +3 -3
  112. data/spec/packet_logs/packet_log_writer_spec.rb +26 -26
  113. data/spec/packets/binary_accessor_spec.rb +672 -672
  114. data/spec/packets/commands_spec.rb +123 -123
  115. data/spec/packets/limits_response_spec.rb +1 -1
  116. data/spec/packets/limits_spec.rb +69 -69
  117. data/spec/packets/packet_config_spec.rb +93 -93
  118. data/spec/packets/packet_item_limits_spec.rb +46 -46
  119. data/spec/packets/packet_item_spec.rb +108 -108
  120. data/spec/packets/packet_spec.rb +364 -348
  121. data/spec/packets/parsers/format_string_parser_spec.rb +13 -13
  122. data/spec/packets/parsers/limits_parser_spec.rb +8 -8
  123. data/spec/packets/parsers/limits_response_parser_spec.rb +9 -9
  124. data/spec/packets/parsers/macro_parser_spec.rb +34 -6
  125. data/spec/packets/parsers/packet_parser_spec.rb +6 -6
  126. data/spec/packets/parsers/processor_parser_spec.rb +7 -7
  127. data/spec/packets/parsers/state_parser_spec.rb +23 -23
  128. data/spec/packets/structure_item_spec.rb +62 -62
  129. data/spec/packets/structure_spec.rb +183 -183
  130. data/spec/packets/telemetry_spec.rb +174 -174
  131. data/spec/processors/new_packet_log_processor_spec.rb +4 -4
  132. data/spec/processors/processor_spec.rb +9 -9
  133. data/spec/processors/statistics_processor_spec.rb +21 -21
  134. data/spec/processors/watermark_processor_spec.rb +12 -12
  135. data/spec/script/script_spec.rb +158 -158
  136. data/spec/spec_helper.rb +44 -13
  137. data/spec/streams/burst_stream_protocol_spec.rb +8 -8
  138. data/spec/streams/fixed_stream_protocol_spec.rb +26 -26
  139. data/spec/streams/length_stream_protocol_spec.rb +27 -27
  140. data/spec/streams/preidentified_stream_protocol_spec.rb +25 -25
  141. data/spec/streams/serial_stream_spec.rb +19 -19
  142. data/spec/streams/stream_protocol_spec.rb +52 -52
  143. data/spec/streams/stream_spec.rb +1 -1
  144. data/spec/streams/tcpip_client_stream_spec.rb +7 -7
  145. data/spec/streams/tcpip_socket_stream_spec.rb +84 -49
  146. data/spec/streams/template_stream_protocol_spec.rb +17 -17
  147. data/spec/streams/terminated_stream_protocol_spec.rb +19 -19
  148. data/spec/system/system_spec.rb +95 -95
  149. data/spec/system/target_spec.rb +32 -32
  150. data/spec/tools/cmd_tlm_server/api_spec.rb +386 -386
  151. data/spec/tools/cmd_tlm_server/background_task_spec.rb +3 -3
  152. data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +8 -8
  153. data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +57 -57
  154. data/spec/tools/cmd_tlm_server/cmd_tlm_server_spec.rb +85 -85
  155. data/spec/tools/cmd_tlm_server/commanding_spec.rb +11 -11
  156. data/spec/tools/cmd_tlm_server/connections_spec.rb +23 -23
  157. data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +57 -57
  158. data/spec/tools/cmd_tlm_server/interfaces_spec.rb +32 -32
  159. data/spec/tools/cmd_tlm_server/packet_logging_spec.rb +17 -17
  160. data/spec/tools/cmd_tlm_server/router_thread_spec.rb +15 -15
  161. data/spec/tools/cmd_tlm_server/routers_spec.rb +36 -36
  162. data/spec/top_level/top_level_spec.rb +60 -60
  163. data/spec/utilities/crc_spec.rb +6 -6
  164. data/spec/utilities/csv_spec.rb +13 -13
  165. data/spec/utilities/logger_spec.rb +20 -20
  166. data/spec/utilities/message_log_spec.rb +13 -13
  167. data/spec/utilities/quaternion_spec.rb +30 -30
  168. data/spec/utilities/ruby_lex_utils_spec.rb +14 -14
  169. data/test/benchmarks/binary_accessor_benchmark.rb +14 -0
  170. data/test/benchmarks/gsub_benchmark.rb +114 -0
  171. data/test/performance/PACKETS.bat +1 -0
  172. data/test/performance/Rakefile +77 -0
  173. data/test/performance/THREADS.bat +1 -0
  174. data/test/performance/config/data/attitude.bin +0 -0
  175. data/test/performance/config/data/crc.txt +206 -0
  176. data/test/performance/config/data/diamond.STL +58 -0
  177. data/test/performance/config/data/groundoff.gif +0 -0
  178. data/test/performance/config/data/groundon.gif +0 -0
  179. data/test/performance/config/data/hselectoff.gif +0 -0
  180. data/test/performance/config/data/hselecton.gif +0 -0
  181. data/test/performance/config/data/hswitchoff.gif +0 -0
  182. data/test/performance/config/data/hswitchon.gif +0 -0
  183. data/test/performance/config/data/meta_init.txt +4 -0
  184. data/test/performance/config/data/position.bin +0 -0
  185. data/test/performance/config/data/poweroff.gif +0 -0
  186. data/test/performance/config/data/poweron.gif +0 -0
  187. data/test/performance/config/data/satellite.gif +0 -0
  188. data/test/performance/config/data/tada.wav +0 -0
  189. data/test/performance/config/data/vswitchoff.gif +0 -0
  190. data/test/performance/config/data/vswitchon.gif +0 -0
  191. data/test/performance/config/system/system_packets.txt +39 -0
  192. data/test/performance/config/system/system_threads.txt +59 -0
  193. data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt +41 -0
  194. data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt +15 -0
  195. data/test/performance/config/targets/COSMOS/cmd_tlm_server.txt +6 -0
  196. data/test/performance/config/targets/COSMOS/screens/limits_change.txt +20 -0
  197. data/test/performance/config/targets/COSMOS/screens/version.txt +19 -0
  198. data/test/performance/config/targets/COSMOS/target.txt +11 -0
  199. data/test/performance/config/targets/EXAMPLE/cmd_tlm/example_cmds.txt +17 -0
  200. data/test/performance/config/targets/EXAMPLE/cmd_tlm/example_tlm.txt +18 -0
  201. data/test/performance/config/targets/EXAMPLE/cmd_tlm_server.txt +6 -0
  202. data/test/performance/config/targets/EXAMPLE/lib/example_interface.rb +22 -0
  203. data/test/performance/config/targets/EXAMPLE/target.txt +7 -0
  204. data/test/performance/config/targets/SYSTEM/screens/status.txt +12 -0
  205. data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_packets.txt +34 -0
  206. data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_threads.txt +68 -0
  207. data/test/performance/config/tools/data_viewer/data_viewer.txt +11 -0
  208. data/test/performance/config/tools/handbook_creator/default_toc.xsl +59 -0
  209. data/test/performance/config/tools/handbook_creator/handbook_creator.txt +66 -0
  210. data/test/performance/config/tools/handbook_creator/templates/command_packets.html.erb +86 -0
  211. data/test/performance/config/tools/handbook_creator/templates/command_toc.html.erb +38 -0
  212. data/test/performance/config/tools/handbook_creator/templates/footer.html.erb +9 -0
  213. data/test/performance/config/tools/handbook_creator/templates/header.html.erb +25 -0
  214. data/test/performance/config/tools/handbook_creator/templates/limits_groups.html.erb +13 -0
  215. data/test/performance/config/tools/handbook_creator/templates/nav.html.erb +27 -0
  216. data/test/performance/config/tools/handbook_creator/templates/overview.html.erb +1 -0
  217. data/test/performance/config/tools/handbook_creator/templates/pdf_cover.html.erb +23 -0
  218. data/test/performance/config/tools/handbook_creator/templates/pdf_footer.html.erb +33 -0
  219. data/test/performance/config/tools/handbook_creator/templates/pdf_header.html.erb +41 -0
  220. data/test/performance/config/tools/handbook_creator/templates/telemetry_packets.html.erb +80 -0
  221. data/test/performance/config/tools/handbook_creator/templates/telemetry_toc.html.erb +38 -0
  222. data/test/performance/config/tools/handbook_creator/templates/title.html.erb +1 -0
  223. data/test/performance/config/tools/launcher/launcher_packets.txt +29 -0
  224. data/test/performance/config/tools/launcher/launcher_threads.txt +70 -0
  225. data/test/performance/config/tools/limits_monitor/README.txt +1 -0
  226. data/test/performance/config/tools/opengl_builder/README.txt +1 -0
  227. data/test/performance/config/tools/script_runner/script_runner.txt +3 -0
  228. data/test/performance/config/tools/table_manager/ConfigTables_def.txt +8 -0
  229. data/test/performance/config/tools/table_manager/ExampleTableDefinition.txt +24 -0
  230. data/test/performance/config/tools/table_manager/MCConfigurationTable_fsw1_def.txt +25 -0
  231. data/test/performance/config/tools/table_manager/MCConfigurationTable_fsw2_def.txt +25 -0
  232. data/test/performance/config/tools/table_manager/PPSSelectionTable_def.txt +8 -0
  233. data/test/performance/config/tools/table_manager/TLMMonitoringTable_def.txt +248 -0
  234. data/test/performance/config/tools/test_runner/test_runner.txt +17 -0
  235. data/test/performance/config/tools/tlm_extractor/tlm_extractor.txt +13 -0
  236. data/test/performance/config/tools/tlm_extractor/tlm_extractor2.txt +2 -0
  237. data/test/performance/config/tools/tlm_extractor/tlm_extractor3.txt +2 -0
  238. data/test/performance/config/tools/tlm_extractor/tlm_extractor4.txt +2 -0
  239. data/test/performance/config/tools/tlm_grapher/README.txt +1 -0
  240. data/test/performance/config/tools/tlm_viewer/tlm_viewer.txt +41 -0
  241. data/test/performance/lib/example_background_task.rb +57 -0
  242. data/test/performance/lib/example_target.rb +120 -0
  243. data/test/performance/lib/scpi_target.rb +74 -0
  244. data/test/performance/lib/user_version.rb +3 -0
  245. data/test/performance/outputs/handbooks/README.txt +1 -0
  246. data/test/performance/outputs/logs/README.txt +1 -0
  247. data/test/performance/outputs/saved_config/README.txt +1 -0
  248. data/test/performance/outputs/tables/README.txt +1 -0
  249. data/test/performance/outputs/tmp/README.txt +1 -0
  250. data/test/performance/procedures/checks.rb +11 -0
  251. data/test/performance/procedures/clear_util.rb +7 -0
  252. data/test/performance/procedures/collect.rb +18 -0
  253. data/test/performance/procedures/collect_util.rb +14 -0
  254. data/test/performance/procedures/cosmos_api_test.rb +293 -0
  255. data/test/performance/procedures/disconnect.rb +29 -0
  256. data/test/performance/procedures/example_test.rb +182 -0
  257. data/test/performance/procedures/plot_test.rb +8 -0
  258. data/test/performance/procedures/procedure.rb +3 -0
  259. data/test/performance/procedures/run_example_test.rb +3 -0
  260. data/test/performance/procedures/test.rb +51 -0
  261. data/test/performance/tools/CmdExtractor +14 -0
  262. data/test/performance/tools/CmdExtractor.bat +59 -0
  263. data/test/performance/tools/CmdSender +14 -0
  264. data/test/performance/tools/CmdSender.bat +59 -0
  265. data/test/performance/tools/CmdTlmServer +16 -0
  266. data/test/performance/tools/CmdTlmServer.bat +59 -0
  267. data/test/performance/tools/CmdTlmServerMemProf +20 -0
  268. data/test/performance/tools/CmdTlmServerMemProf.bat +59 -0
  269. data/test/performance/tools/DataViewer +14 -0
  270. data/test/performance/tools/DataViewer.bat +59 -0
  271. data/test/performance/tools/ExampleTarget +14 -0
  272. data/test/performance/tools/ExampleTarget.bat +59 -0
  273. data/test/performance/tools/HandbookCreator +14 -0
  274. data/test/performance/tools/HandbookCreator.bat +61 -0
  275. data/test/performance/tools/Launcher +14 -0
  276. data/test/performance/tools/Launcher.bat +59 -0
  277. data/test/performance/tools/LimitsMonitor +14 -0
  278. data/test/performance/tools/LimitsMonitor.bat +59 -0
  279. data/test/performance/tools/OpenGLBuilder +14 -0
  280. data/test/performance/tools/OpenGLBuilder.bat +59 -0
  281. data/test/performance/tools/PacketViewer +14 -0
  282. data/test/performance/tools/PacketViewer.bat +59 -0
  283. data/test/performance/tools/Replay +14 -0
  284. data/test/performance/tools/Replay.bat +59 -0
  285. data/test/performance/tools/ScpiTarget +14 -0
  286. data/test/performance/tools/ScpiTarget.bat +59 -0
  287. data/test/performance/tools/ScriptRunner +14 -0
  288. data/test/performance/tools/ScriptRunner.bat +59 -0
  289. data/test/performance/tools/TableManager +14 -0
  290. data/test/performance/tools/TableManager.bat +59 -0
  291. data/test/performance/tools/TestRunner +14 -0
  292. data/test/performance/tools/TestRunner.bat +59 -0
  293. data/test/performance/tools/TlmExtractor +14 -0
  294. data/test/performance/tools/TlmExtractor.bat +59 -0
  295. data/test/performance/tools/TlmGrapher +14 -0
  296. data/test/performance/tools/TlmGrapher.bat +59 -0
  297. data/test/performance/tools/TlmViewer +14 -0
  298. data/test/performance/tools/TlmViewer.bat +59 -0
  299. data/test/performance/tools/mac/CmdExtractor.app/Contents/Info.plist +38 -0
  300. data/test/performance/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +15 -0
  301. data/test/performance/tools/mac/CmdExtractor.app/Contents/MacOS/main.sh +6 -0
  302. data/test/performance/tools/mac/CmdExtractor.app/Contents/Resources/appIcon.icns +0 -0
  303. data/test/performance/tools/mac/CmdSender.app/Contents/Info.plist +38 -0
  304. data/test/performance/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +15 -0
  305. data/test/performance/tools/mac/CmdSender.app/Contents/MacOS/main.sh +6 -0
  306. data/test/performance/tools/mac/CmdSender.app/Contents/Resources/appIcon.icns +0 -0
  307. data/test/performance/tools/mac/CmdTlmServer.app/Contents/Info.plist +38 -0
  308. data/test/performance/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +15 -0
  309. data/test/performance/tools/mac/CmdTlmServer.app/Contents/MacOS/main.sh +6 -0
  310. data/test/performance/tools/mac/CmdTlmServer.app/Contents/Resources/appIcon.icns +0 -0
  311. data/test/performance/tools/mac/DataViewer.app/Contents/Info.plist +38 -0
  312. data/test/performance/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +15 -0
  313. data/test/performance/tools/mac/DataViewer.app/Contents/MacOS/main.sh +6 -0
  314. data/test/performance/tools/mac/DataViewer.app/Contents/Resources/appIcon.icns +0 -0
  315. data/test/performance/tools/mac/HandbookCreator.app/Contents/Info.plist +38 -0
  316. data/test/performance/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +15 -0
  317. data/test/performance/tools/mac/HandbookCreator.app/Contents/MacOS/main.sh +6 -0
  318. data/test/performance/tools/mac/HandbookCreator.app/Contents/Resources/appIcon.icns +0 -0
  319. data/test/performance/tools/mac/Launcher.app/Contents/Info.plist +38 -0
  320. data/test/performance/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +15 -0
  321. data/test/performance/tools/mac/Launcher.app/Contents/MacOS/main.sh +6 -0
  322. data/test/performance/tools/mac/Launcher.app/Contents/Resources/appIcon.icns +0 -0
  323. data/test/performance/tools/mac/LimitsMonitor.app/Contents/Info.plist +38 -0
  324. data/test/performance/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +15 -0
  325. data/test/performance/tools/mac/LimitsMonitor.app/Contents/MacOS/main.sh +6 -0
  326. data/test/performance/tools/mac/LimitsMonitor.app/Contents/Resources/appIcon.icns +0 -0
  327. data/test/performance/tools/mac/OpenGLBuilder.app/Contents/Info.plist +38 -0
  328. data/test/performance/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +15 -0
  329. data/test/performance/tools/mac/OpenGLBuilder.app/Contents/MacOS/main.sh +6 -0
  330. data/test/performance/tools/mac/OpenGLBuilder.app/Contents/Resources/appIcon.icns +0 -0
  331. data/test/performance/tools/mac/PacketViewer.app/Contents/Info.plist +38 -0
  332. data/test/performance/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +15 -0
  333. data/test/performance/tools/mac/PacketViewer.app/Contents/MacOS/main.sh +6 -0
  334. data/test/performance/tools/mac/PacketViewer.app/Contents/Resources/appIcon.icns +0 -0
  335. data/test/performance/tools/mac/Replay.app/Contents/Info.plist +38 -0
  336. data/test/performance/tools/mac/Replay.app/Contents/MacOS/Replay.rb +15 -0
  337. data/test/performance/tools/mac/Replay.app/Contents/MacOS/main.sh +6 -0
  338. data/test/performance/tools/mac/Replay.app/Contents/Resources/appIcon.icns +0 -0
  339. data/test/performance/tools/mac/ScriptRunner.app/Contents/Info.plist +38 -0
  340. data/test/performance/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +15 -0
  341. data/test/performance/tools/mac/ScriptRunner.app/Contents/MacOS/main.sh +6 -0
  342. data/test/performance/tools/mac/ScriptRunner.app/Contents/Resources/appIcon.icns +0 -0
  343. data/test/performance/tools/mac/TableManager.app/Contents/Info.plist +38 -0
  344. data/test/performance/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +15 -0
  345. data/test/performance/tools/mac/TableManager.app/Contents/MacOS/main.sh +6 -0
  346. data/test/performance/tools/mac/TableManager.app/Contents/Resources/appIcon.icns +0 -0
  347. data/test/performance/tools/mac/TestRunner.app/Contents/Info.plist +38 -0
  348. data/test/performance/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +15 -0
  349. data/test/performance/tools/mac/TestRunner.app/Contents/MacOS/main.sh +6 -0
  350. data/test/performance/tools/mac/TestRunner.app/Contents/Resources/appIcon.icns +0 -0
  351. data/test/performance/tools/mac/TlmExtractor.app/Contents/Info.plist +38 -0
  352. data/test/performance/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +15 -0
  353. data/test/performance/tools/mac/TlmExtractor.app/Contents/MacOS/main.sh +6 -0
  354. data/test/performance/tools/mac/TlmExtractor.app/Contents/Resources/appIcon.icns +0 -0
  355. data/test/performance/tools/mac/TlmGrapher.app/Contents/Info.plist +38 -0
  356. data/test/performance/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +15 -0
  357. data/test/performance/tools/mac/TlmGrapher.app/Contents/MacOS/main.sh +6 -0
  358. data/test/performance/tools/mac/TlmGrapher.app/Contents/Resources/appIcon.icns +0 -0
  359. data/test/performance/tools/mac/TlmViewer.app/Contents/Info.plist +38 -0
  360. data/test/performance/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +15 -0
  361. data/test/performance/tools/mac/TlmViewer.app/Contents/MacOS/main.sh +6 -0
  362. data/test/performance/tools/mac/TlmViewer.app/Contents/Resources/appIcon.icns +0 -0
  363. data/test/performance/userpath.txt +1 -0
  364. metadata +197 -2
@@ -21,26 +21,26 @@ module Cosmos
21
21
  end
22
22
 
23
23
  describe "initialize" do
24
- it "should create a target with the given name" do
25
- Target.new("TGT").name.should eql "TGT"
24
+ it "creates a target with the given name" do
25
+ expect(Target.new("TGT").name).to eql "TGT"
26
26
  end
27
27
 
28
- it "should create a target with the given substitute name" do
28
+ it "creates a target with the given substitute name" do
29
29
  tgt = Target.new("TGT","TGT2")
30
- tgt.name.should eql "TGT2"
31
- tgt.original_name.should eql "TGT"
30
+ expect(tgt.name).to eql "TGT2"
31
+ expect(tgt.original_name).to eql "TGT"
32
32
  end
33
33
 
34
- it "should create a target with the default dir" do
35
- Target.new("TGT").dir.should eql File.join(USERPATH,'config','targets','TGT')
34
+ it "creates a target with the default dir" do
35
+ expect(Target.new("TGT").dir).to eql File.join(USERPATH,'config','targets','TGT')
36
36
  end
37
37
 
38
- it "should create a target with an override path" do
38
+ it "creates a target with an override path" do
39
39
  saved = File.join(USERPATH,'saved')
40
- Target.new("TGT",nil,saved).dir.should eql File.join(saved,'TGT')
40
+ expect(Target.new("TGT",nil,saved).dir).to eql File.join(saved,'TGT')
41
41
  end
42
42
 
43
- it "should record all the command and telemetry files in the target directory" do
43
+ it "records all the command and telemetry files in the target directory" do
44
44
  tgt_path = File.join(Cosmos::USERPATH,'target_spec_temp')
45
45
  tgt_name = "TEST"
46
46
  cmd_tlm = File.join(tgt_path,tgt_name,'cmd_tlm')
@@ -51,16 +51,16 @@ module Cosmos
51
51
  File.open(File.join(cmd_tlm,'tlm2.txt'),'w') {}
52
52
 
53
53
  tgt = Target.new(tgt_name,nil,tgt_path)
54
- tgt.dir.should eql File.join(tgt_path,tgt_name)
54
+ expect(tgt.dir).to eql File.join(tgt_path,tgt_name)
55
55
  files = Dir[File.join(cmd_tlm,'*.txt')]
56
- files.should_not be_empty
57
- tgt.cmd_tlm_files.length.should eql 4
58
- tgt.cmd_tlm_files.sort.should eql files.sort
56
+ expect(files).not_to be_empty
57
+ expect(tgt.cmd_tlm_files.length).to eql 4
58
+ expect(tgt.cmd_tlm_files.sort).to eql files.sort
59
59
 
60
60
  FileUtils.rm_r(tgt_path)
61
61
  end
62
62
 
63
- it "should process a target.txt in the target directory" do
63
+ it "processes a target.txt in the target directory" do
64
64
  tgt_path = File.join(Cosmos::USERPATH,'target_spec_temp')
65
65
  tgt_name = "TEST"
66
66
  tgt_dir = File.join(tgt_path,tgt_name)
@@ -70,13 +70,13 @@ module Cosmos
70
70
  end
71
71
 
72
72
  tgt = Target.new(tgt_name,nil,tgt_path)
73
- tgt.dir.should eql tgt_dir
74
- tgt.ignored_parameters.should eql ["TEST"]
73
+ expect(tgt.dir).to eql tgt_dir
74
+ expect(tgt.ignored_parameters).to eql ["TEST"]
75
75
 
76
76
  FileUtils.rm_r(tgt_path)
77
77
  end
78
78
 
79
- it "should process an alternative target.txt in the target directory" do
79
+ it "processes an alternative target.txt in the target directory" do
80
80
  tgt_path = File.join(Cosmos::USERPATH,'target_spec_temp')
81
81
  tgt_name = "TEST"
82
82
  tgt_dir = File.join(tgt_path,tgt_name)
@@ -86,15 +86,15 @@ module Cosmos
86
86
  end
87
87
 
88
88
  tgt = Target.new(tgt_name,nil,tgt_path, 'target_other.txt')
89
- tgt.dir.should eql tgt_dir
90
- tgt.ignored_parameters.should eql ["BOB"]
89
+ expect(tgt.dir).to eql tgt_dir
90
+ expect(tgt.ignored_parameters).to eql ["BOB"]
91
91
 
92
92
  FileUtils.rm_r(tgt_path)
93
93
  end
94
94
  end
95
95
 
96
96
  describe "process_file" do
97
- it "should complain about unknown keywords" do
97
+ it "complains about unknown keywords" do
98
98
  tf = Tempfile.new('unittest')
99
99
  tf.puts("BLAH")
100
100
  tf.close
@@ -103,7 +103,7 @@ module Cosmos
103
103
  end
104
104
 
105
105
  context "with REQUIRE" do
106
- it "should take 1 parameters" do
106
+ it "takes 1 parameters" do
107
107
  tf = Tempfile.new('unittest')
108
108
  tf.puts("REQUIRE")
109
109
  tf.close
@@ -117,7 +117,7 @@ module Cosmos
117
117
  tf.unlink
118
118
  end
119
119
 
120
- it "should complain if the file doesn't exist" do
120
+ it "complains if the file doesn't exist" do
121
121
  tf = Tempfile.new('unittest')
122
122
  tf.puts("REQUIRE my_file.rb")
123
123
  tf.close
@@ -125,7 +125,7 @@ module Cosmos
125
125
  tf.unlink
126
126
  end
127
127
 
128
- it "should require the file" do
128
+ it "requires the file" do
129
129
  filename = File.join(File.dirname(__FILE__),'..','..','lib','my_file.rb')
130
130
  File.open(filename, 'w') do |file|
131
131
  file.puts "class MyFile"
@@ -142,7 +142,7 @@ module Cosmos
142
142
  end
143
143
 
144
144
  context "with IGNORE_PARAMETER" do
145
- it "should take 1 parameters" do
145
+ it "takes 1 parameters" do
146
146
  tf = Tempfile.new('unittest')
147
147
  tf.puts("IGNORE_PARAMETER")
148
148
  tf.close
@@ -156,19 +156,19 @@ module Cosmos
156
156
  tf.unlink
157
157
  end
158
158
 
159
- it "should store the parameter" do
159
+ it "stores the parameter" do
160
160
  tf = Tempfile.new('unittest')
161
161
  tf.puts("IGNORE_PARAMETER TEST")
162
162
  tf.close
163
163
  tgt = Target.new("TGT")
164
164
  tgt.process_file(tf.path)
165
- tgt.ignored_parameters.should eql ["TEST"]
165
+ expect(tgt.ignored_parameters).to eql ["TEST"]
166
166
  tf.unlink
167
167
  end
168
168
  end
169
169
 
170
170
  context "with COMMANDS and TELEMETRY" do
171
- it "should take 1 parameters" do
171
+ it "takes 1 parameters" do
172
172
  tf = Tempfile.new('unittest')
173
173
  tf.puts("COMMANDS")
174
174
  tf.close
@@ -194,7 +194,7 @@ module Cosmos
194
194
  tf.unlink
195
195
  end
196
196
 
197
- it "should store the filename" do
197
+ it "stores the filename" do
198
198
  tgt_path = File.join(Cosmos::USERPATH,'target_spec_temp')
199
199
  tgt_name = "TEST"
200
200
  tgt_dir = File.join(tgt_path,tgt_name)
@@ -212,9 +212,9 @@ module Cosmos
212
212
  end
213
213
 
214
214
  tgt = Target.new(tgt_name,nil,tgt_path)
215
- tgt.dir.should eql tgt_dir
216
- tgt.cmd_tlm_files.length.should eql 2
217
- tgt.cmd_tlm_files.should eql [tgt_dir + '/cmd_tlm/tgt_cmds2.txt', tgt_dir + '/cmd_tlm/tgt_tlm3.txt']
215
+ expect(tgt.dir).to eql tgt_dir
216
+ expect(tgt.cmd_tlm_files.length).to eql 2
217
+ expect(tgt.cmd_tlm_files).to eql [tgt_dir + '/cmd_tlm/tgt_cmds2.txt', tgt_dir + '/cmd_tlm/tgt_tlm3.txt']
218
218
 
219
219
  FileUtils.rm_r(tgt_dir)
220
220
  end
@@ -55,402 +55,402 @@ module Cosmos
55
55
  end
56
56
 
57
57
  describe "cmd" do
58
- it "should complain about unknown targets, commands, and parameters" do
58
+ it "complains about unknown targets, commands, and parameters" do
59
59
  test_cmd_unknown(:cmd)
60
60
  sleep(0.5)
61
61
  end
62
62
 
63
- it "should process a string" do
63
+ it "processes a string" do
64
64
  target_name, cmd_name, params = @api.cmd("INST COLLECT with TYPE NORMAL, DURATION 5")
65
- target_name.should eql 'INST'
66
- cmd_name.should eql 'COLLECT'
67
- params.should include('TYPE'=>'NORMAL', 'DURATION'=>5)
65
+ expect(target_name).to eql 'INST'
66
+ expect(cmd_name).to eql 'COLLECT'
67
+ expect(params).to include('TYPE'=>'NORMAL', 'DURATION'=>5)
68
68
  end
69
69
 
70
- it "should complain if parameters are not separated by commas" do
70
+ it "complains if parameters are not separated by commas" do
71
71
  expect { @api.cmd("INST COLLECT with TYPE NORMAL DURATION 5") }.to raise_error(/Missing comma/)
72
72
  end
73
73
 
74
- it "should complain if parameters don't have values" do
74
+ it "complains if parameters don't have values" do
75
75
  expect { @api.cmd("INST COLLECT with TYPE") }.to raise_error(/Missing value/)
76
76
  end
77
77
 
78
- it "should process parameters" do
78
+ it "processes parameters" do
79
79
  target_name, cmd_name, params = @api.cmd("INST","COLLECT","TYPE"=>"NORMAL","DURATION"=>5)
80
- target_name.should eql 'INST'
81
- cmd_name.should eql 'COLLECT'
82
- params.should include('TYPE'=>'NORMAL', 'DURATION'=>5)
80
+ expect(target_name).to eql 'INST'
81
+ expect(cmd_name).to eql 'COLLECT'
82
+ expect(params).to include('TYPE'=>'NORMAL', 'DURATION'=>5)
83
83
  end
84
84
 
85
- it "should process commands without parameters" do
85
+ it "processes commands without parameters" do
86
86
  target_name, cmd_name, params = @api.cmd("INST","ABORT")
87
- target_name.should eql 'INST'
88
- cmd_name.should eql 'ABORT'
89
- params.should be {}
87
+ expect(target_name).to eql 'INST'
88
+ expect(cmd_name).to eql 'ABORT'
89
+ expect(params).to be {}
90
90
  end
91
91
 
92
- it "should complain about too many parameters" do
92
+ it "complains about too many parameters" do
93
93
  expect { @api.cmd("INST","COLLECT","TYPE","DURATION") }.to raise_error(/Invalid number of arguments/)
94
94
  end
95
95
 
96
- it "should warn about required parameters" do
96
+ it "warns about required parameters" do
97
97
  expect { @api.cmd("INST COLLECT with DURATION 5") }.to raise_error(/Required/)
98
98
  end
99
99
 
100
- it "should warn about out of range parameters" do
100
+ it "warns about out of range parameters" do
101
101
  expect { @api.cmd("INST COLLECT with TYPE NORMAL, DURATION 1000") }.to raise_error(/not in valid range/)
102
102
  end
103
103
 
104
- it "should warn about hazardous parameters" do
104
+ it "warns about hazardous parameters" do
105
105
  expect { @api.cmd("INST COLLECT with TYPE SPECIAL") }.to raise_error(/Hazardous/)
106
106
  end
107
107
 
108
- it "should warn about hazardous commands" do
108
+ it "warns about hazardous commands" do
109
109
  expect { @api.cmd("INST CLEAR") }.to raise_error(/Hazardous/)
110
110
  end
111
111
  end
112
112
 
113
113
  describe "cmd_no_range_check" do
114
- it "should complain about unknown targets, commands, and parameters" do
114
+ it "complains about unknown targets, commands, and parameters" do
115
115
  test_cmd_unknown(:cmd_no_range_check)
116
116
  end
117
117
 
118
- it "should process a string" do
118
+ it "processes a string" do
119
119
  target_name, cmd_no_range_check_name, params = @api.cmd_no_range_check("INST COLLECT with TYPE NORMAL, DURATION 5")
120
- target_name.should eql 'INST'
121
- cmd_no_range_check_name.should eql 'COLLECT'
122
- params.should include('TYPE'=>'NORMAL', 'DURATION'=>5)
120
+ expect(target_name).to eql 'INST'
121
+ expect(cmd_no_range_check_name).to eql 'COLLECT'
122
+ expect(params).to include('TYPE'=>'NORMAL', 'DURATION'=>5)
123
123
  end
124
124
 
125
- it "should process parameters" do
125
+ it "processes parameters" do
126
126
  target_name, cmd_no_range_check_name, params = @api.cmd_no_range_check("INST","COLLECT","TYPE"=>"NORMAL","DURATION"=>5)
127
- target_name.should eql 'INST'
128
- cmd_no_range_check_name.should eql 'COLLECT'
129
- params.should include('TYPE'=>'NORMAL', 'DURATION'=>5)
127
+ expect(target_name).to eql 'INST'
128
+ expect(cmd_no_range_check_name).to eql 'COLLECT'
129
+ expect(params).to include('TYPE'=>'NORMAL', 'DURATION'=>5)
130
130
  end
131
131
 
132
- it "should warn about required parameters" do
132
+ it "warns about required parameters" do
133
133
  expect { @api.cmd_no_range_check("INST COLLECT with DURATION 5") }.to raise_error(/Required/)
134
134
  end
135
135
 
136
- it "should not warn about out of range parameters" do
136
+ it "does not warn about out of range parameters" do
137
137
  expect { @api.cmd_no_range_check("INST COLLECT with TYPE NORMAL, DURATION 1000") }.to_not raise_error
138
138
  end
139
139
 
140
- it "should warn about hazardous parameters" do
140
+ it "warns about hazardous parameters" do
141
141
  expect { @api.cmd_no_range_check("INST COLLECT with TYPE SPECIAL") }.to raise_error(/Hazardous/)
142
142
  end
143
143
 
144
- it "should warn about hazardous commands" do
144
+ it "warns about hazardous commands" do
145
145
  expect { @api.cmd_no_range_check("INST CLEAR") }.to raise_error(/Hazardous/)
146
146
  end
147
147
  end
148
148
 
149
149
  describe "cmd_no_hazardous_check" do
150
- it "should complain about unknown targets, commands, and parameters" do
150
+ it "complains about unknown targets, commands, and parameters" do
151
151
  test_cmd_unknown(:cmd_no_hazardous_check)
152
152
  end
153
153
 
154
- it "should process a string" do
154
+ it "processes a string" do
155
155
  target_name, cmd_no_hazardous_check_name, params = @api.cmd_no_hazardous_check("INST COLLECT with TYPE NORMAL, DURATION 5")
156
- target_name.should eql 'INST'
157
- cmd_no_hazardous_check_name.should eql 'COLLECT'
158
- params.should include('TYPE'=>'NORMAL', 'DURATION'=>5)
156
+ expect(target_name).to eql 'INST'
157
+ expect(cmd_no_hazardous_check_name).to eql 'COLLECT'
158
+ expect(params).to include('TYPE'=>'NORMAL', 'DURATION'=>5)
159
159
  end
160
160
 
161
- it "should process parameters" do
161
+ it "processes parameters" do
162
162
  target_name, cmd_no_hazardous_check_name, params = @api.cmd_no_hazardous_check("INST","COLLECT","TYPE"=>"NORMAL","DURATION"=>5)
163
- target_name.should eql 'INST'
164
- cmd_no_hazardous_check_name.should eql 'COLLECT'
165
- params.should include('TYPE'=>'NORMAL', 'DURATION'=>5)
163
+ expect(target_name).to eql 'INST'
164
+ expect(cmd_no_hazardous_check_name).to eql 'COLLECT'
165
+ expect(params).to include('TYPE'=>'NORMAL', 'DURATION'=>5)
166
166
  end
167
167
 
168
- it "should process parameters that are strings" do
168
+ it "processes parameters that are strings" do
169
169
  target_name, cmd_name, params = @api.cmd_no_hazardous_check("INST ASCIICMD with STRING 'ARM LASER'")
170
- target_name.should eql 'INST'
171
- cmd_name.should eql 'ASCIICMD'
172
- params.should include('STRING'=>'ARM LASER')
170
+ expect(target_name).to eql 'INST'
171
+ expect(cmd_name).to eql 'ASCIICMD'
172
+ expect(params).to include('STRING'=>'ARM LASER')
173
173
  end
174
174
 
175
- it "should warn about required parameters" do
175
+ it "warns about required parameters" do
176
176
  expect { @api.cmd_no_hazardous_check("INST COLLECT with DURATION 5") }.to raise_error(/Required/)
177
177
  end
178
178
 
179
- it "should warn about out of range parameters" do
179
+ it "warns about out of range parameters" do
180
180
  expect { @api.cmd_no_hazardous_check("INST COLLECT with TYPE NORMAL, DURATION 1000") }.to raise_error(/not in valid range/)
181
181
  end
182
182
 
183
- it "should not warn about hazardous parameters" do
183
+ it "does not warn about hazardous parameters" do
184
184
  expect { @api.cmd_no_hazardous_check("INST COLLECT with TYPE SPECIAL") }.to_not raise_error
185
185
  end
186
186
 
187
- it "should not warn about hazardous commands" do
187
+ it "does not warn about hazardous commands" do
188
188
  expect { @api.cmd_no_hazardous_check("INST CLEAR") }.to_not raise_error
189
189
  end
190
190
  end
191
191
 
192
192
  describe "cmd_no_checks" do
193
- it "should complain about unknown targets, commands, and parameters" do
193
+ it "complains about unknown targets, commands, and parameters" do
194
194
  test_cmd_unknown(:cmd_no_checks)
195
195
  end
196
196
 
197
- it "should process a string" do
197
+ it "processes a string" do
198
198
  target_name, cmd_no_checks_name, params = @api.cmd_no_checks("INST COLLECT with TYPE NORMAL, DURATION 5")
199
- target_name.should eql 'INST'
200
- cmd_no_checks_name.should eql 'COLLECT'
201
- params.should include('TYPE'=>'NORMAL', 'DURATION'=>5)
199
+ expect(target_name).to eql 'INST'
200
+ expect(cmd_no_checks_name).to eql 'COLLECT'
201
+ expect(params).to include('TYPE'=>'NORMAL', 'DURATION'=>5)
202
202
  end
203
203
 
204
- it "should process parameters" do
204
+ it "processes parameters" do
205
205
  target_name, cmd_no_checks_name, params = @api.cmd_no_checks("INST","COLLECT","TYPE"=>"NORMAL","DURATION"=>5)
206
- target_name.should eql 'INST'
207
- cmd_no_checks_name.should eql 'COLLECT'
208
- params.should include('TYPE'=>'NORMAL', 'DURATION'=>5)
206
+ expect(target_name).to eql 'INST'
207
+ expect(cmd_no_checks_name).to eql 'COLLECT'
208
+ expect(params).to include('TYPE'=>'NORMAL', 'DURATION'=>5)
209
209
  end
210
210
 
211
- it "should warn about required parameters" do
211
+ it "warns about required parameters" do
212
212
  expect { @api.cmd_no_checks("INST COLLECT with DURATION 5") }.to raise_error(/Required/)
213
213
  end
214
214
 
215
- it "should not warn about out of range parameters" do
215
+ it "does not warn about out of range parameters" do
216
216
  expect { @api.cmd_no_checks("INST COLLECT with TYPE NORMAL, DURATION 1000") }.to_not raise_error
217
217
  end
218
218
 
219
- it "should not warn about hazardous parameters" do
219
+ it "does not warn about hazardous parameters" do
220
220
  expect { @api.cmd_no_checks("INST COLLECT with TYPE SPECIAL") }.to_not raise_error
221
221
  end
222
222
 
223
- it "should not warn about hazardous commands" do
223
+ it "does not warn about hazardous commands" do
224
224
  expect { @api.cmd_no_checks("INST CLEAR") }.to_not raise_error
225
225
  end
226
226
  end
227
227
 
228
228
  describe "cmd_raw" do
229
- it "should complain about unknown targets, commands, and parameters" do
229
+ it "complains about unknown targets, commands, and parameters" do
230
230
  test_cmd_unknown(:cmd_raw)
231
231
  end
232
232
 
233
- it "should process a string" do
233
+ it "processes a string" do
234
234
  target_name, cmd_name, params = @api.cmd_raw("INST COLLECT with TYPE 0, DURATION 5")
235
- target_name.should eql 'INST'
236
- cmd_name.should eql 'COLLECT'
237
- params.should include('TYPE'=>0, 'DURATION'=>5)
235
+ expect(target_name).to eql 'INST'
236
+ expect(cmd_name).to eql 'COLLECT'
237
+ expect(params).to include('TYPE'=>0, 'DURATION'=>5)
238
238
  end
239
239
 
240
- it "should complain if parameters are not separated by commas" do
240
+ it "complains if parameters are not separated by commas" do
241
241
  expect { @api.cmd_raw("INST COLLECT with TYPE 0 DURATION 5") }.to raise_error(/Missing comma/)
242
242
  end
243
243
 
244
- it "should complain if parameters don't have values" do
244
+ it "complains if parameters don't have values" do
245
245
  expect { @api.cmd_raw("INST COLLECT with TYPE") }.to raise_error(/Missing value/)
246
246
  end
247
247
 
248
- it "should process parameters" do
248
+ it "processes parameters" do
249
249
  target_name, cmd_name, params = @api.cmd_raw("INST","COLLECT","TYPE"=>0,"DURATION"=>5)
250
- target_name.should eql 'INST'
251
- cmd_name.should eql 'COLLECT'
252
- params.should include('TYPE'=>0, 'DURATION'=>5)
250
+ expect(target_name).to eql 'INST'
251
+ expect(cmd_name).to eql 'COLLECT'
252
+ expect(params).to include('TYPE'=>0, 'DURATION'=>5)
253
253
  end
254
254
 
255
- it "should process commands without parameters" do
255
+ it "processes commands without parameters" do
256
256
  target_name, cmd_name, params = @api.cmd_raw("INST","ABORT")
257
- target_name.should eql 'INST'
258
- cmd_name.should eql 'ABORT'
259
- params.should be {}
257
+ expect(target_name).to eql 'INST'
258
+ expect(cmd_name).to eql 'ABORT'
259
+ expect(params).to be {}
260
260
  end
261
261
 
262
- it "should complain about too many parameters" do
262
+ it "complains about too many parameters" do
263
263
  expect { @api.cmd_raw("INST","COLLECT","TYPE","DURATION") }.to raise_error(/Invalid number of arguments/)
264
264
  end
265
265
 
266
- it "should warn about required parameters" do
266
+ it "warns about required parameters" do
267
267
  expect { @api.cmd_raw("INST COLLECT with DURATION 5") }.to raise_error(/Required/)
268
268
  end
269
269
 
270
- it "should warn about out of range parameters" do
270
+ it "warns about out of range parameters" do
271
271
  expect { @api.cmd_raw("INST COLLECT with TYPE 0, DURATION 1000") }.to raise_error(/not in valid range/)
272
272
  end
273
273
 
274
- it "should warn about hazardous parameters" do
274
+ it "warns about hazardous parameters" do
275
275
  expect { @api.cmd_raw("INST COLLECT with TYPE 1") }.to raise_error(/Hazardous/)
276
276
  end
277
277
 
278
- it "should warn about hazardous commands" do
278
+ it "warns about hazardous commands" do
279
279
  expect { @api.cmd_raw("INST CLEAR") }.to raise_error(/Hazardous/)
280
280
  end
281
281
  end
282
282
 
283
283
  describe "cmd_no_range_check" do
284
- it "should complain about unknown targets, commands, and parameters" do
284
+ it "complains about unknown targets, commands, and parameters" do
285
285
  test_cmd_unknown(:cmd_raw_no_range_check)
286
286
  end
287
287
 
288
- it "should process a string" do
288
+ it "processes a string" do
289
289
  target_name, cmd_no_range_check_name, params = @api.cmd_raw_no_range_check("INST COLLECT with TYPE 0, DURATION 5")
290
- target_name.should eql 'INST'
291
- cmd_no_range_check_name.should eql 'COLLECT'
292
- params.should include('TYPE'=>0, 'DURATION'=>5)
290
+ expect(target_name).to eql 'INST'
291
+ expect(cmd_no_range_check_name).to eql 'COLLECT'
292
+ expect(params).to include('TYPE'=>0, 'DURATION'=>5)
293
293
  end
294
294
 
295
- it "should process parameters" do
295
+ it "processes parameters" do
296
296
  target_name, cmd_no_range_check_name, params = @api.cmd_raw_no_range_check("INST","COLLECT","TYPE"=>0,"DURATION"=>5)
297
- target_name.should eql 'INST'
298
- cmd_no_range_check_name.should eql 'COLLECT'
299
- params.should include('TYPE'=>0, 'DURATION'=>5)
297
+ expect(target_name).to eql 'INST'
298
+ expect(cmd_no_range_check_name).to eql 'COLLECT'
299
+ expect(params).to include('TYPE'=>0, 'DURATION'=>5)
300
300
  end
301
301
 
302
- it "should warn about required parameters" do
302
+ it "warns about required parameters" do
303
303
  expect { @api.cmd_raw_no_range_check("INST COLLECT with DURATION 5") }.to raise_error(/Required/)
304
304
  end
305
305
 
306
- it "should not warn about out of range parameters" do
306
+ it "does not warn about out of range parameters" do
307
307
  expect { @api.cmd_raw_no_range_check("INST COLLECT with TYPE 0, DURATION 1000") }.to_not raise_error
308
308
  end
309
309
 
310
- it "should warn about hazardous parameters" do
310
+ it "warns about hazardous parameters" do
311
311
  expect { @api.cmd_raw_no_range_check("INST COLLECT with TYPE 1") }.to raise_error(/Hazardous/)
312
312
  end
313
313
 
314
- it "should warn about hazardous commands" do
314
+ it "warns about hazardous commands" do
315
315
  expect { @api.cmd_raw_no_range_check("INST CLEAR") }.to raise_error(/Hazardous/)
316
316
  end
317
317
  end
318
318
 
319
319
  describe "cmd_raw_no_hazardous_check" do
320
- it "should complain about unknown targets, commands, and parameters" do
320
+ it "complains about unknown targets, commands, and parameters" do
321
321
  test_cmd_unknown(:cmd_raw_no_hazardous_check)
322
322
  end
323
323
 
324
- it "should process a string" do
324
+ it "processes a string" do
325
325
  target_name, cmd_no_hazardous_check_name, params = @api.cmd_raw_no_hazardous_check("INST COLLECT with TYPE 0, DURATION 5")
326
- target_name.should eql 'INST'
327
- cmd_no_hazardous_check_name.should eql 'COLLECT'
328
- params.should include('TYPE'=>0, 'DURATION'=>5)
326
+ expect(target_name).to eql 'INST'
327
+ expect(cmd_no_hazardous_check_name).to eql 'COLLECT'
328
+ expect(params).to include('TYPE'=>0, 'DURATION'=>5)
329
329
  end
330
330
 
331
- it "should process parameters" do
331
+ it "processes parameters" do
332
332
  target_name, cmd_no_hazardous_check_name, params = @api.cmd_raw_no_hazardous_check("INST","COLLECT","TYPE"=>0,"DURATION"=>5)
333
- target_name.should eql 'INST'
334
- cmd_no_hazardous_check_name.should eql 'COLLECT'
335
- params.should include('TYPE'=>0, 'DURATION'=>5)
333
+ expect(target_name).to eql 'INST'
334
+ expect(cmd_no_hazardous_check_name).to eql 'COLLECT'
335
+ expect(params).to include('TYPE'=>0, 'DURATION'=>5)
336
336
  end
337
337
 
338
- it "should process parameters that are strings" do
338
+ it "processes parameters that are strings" do
339
339
  target_name, cmd_name, params = @api.cmd_raw_no_hazardous_check("INST ASCIICMD with STRING 'ARM LASER'")
340
- target_name.should eql 'INST'
341
- cmd_name.should eql 'ASCIICMD'
342
- params.should include('STRING'=>'ARM LASER')
340
+ expect(target_name).to eql 'INST'
341
+ expect(cmd_name).to eql 'ASCIICMD'
342
+ expect(params).to include('STRING'=>'ARM LASER')
343
343
  end
344
344
 
345
- it "should warn about required parameters" do
345
+ it "warns about required parameters" do
346
346
  expect { @api.cmd_raw_no_hazardous_check("INST COLLECT with DURATION 5") }.to raise_error(/Required/)
347
347
  end
348
348
 
349
- it "should warn about out of range parameters" do
349
+ it "warns about out of range parameters" do
350
350
  expect { @api.cmd_raw_no_hazardous_check("INST COLLECT with TYPE 0, DURATION 1000") }.to raise_error(/not in valid range/)
351
351
  end
352
352
 
353
- it "should not warn about hazardous parameters" do
353
+ it "does not warn about hazardous parameters" do
354
354
  expect { @api.cmd_raw_no_hazardous_check("INST COLLECT with TYPE 1") }.to_not raise_error
355
355
  end
356
356
 
357
- it "should not warn about hazardous commands" do
357
+ it "does not warn about hazardous commands" do
358
358
  expect { @api.cmd_raw_no_hazardous_check("INST CLEAR") }.to_not raise_error
359
359
  end
360
360
  end
361
361
 
362
362
  describe "cmd_raw_no_checks" do
363
- it "should complain about unknown targets, commands, and parameters" do
363
+ it "complains about unknown targets, commands, and parameters" do
364
364
  test_cmd_unknown(:cmd_raw_no_checks)
365
365
  end
366
366
 
367
- it "should process a string" do
367
+ it "processes a string" do
368
368
  target_name, cmd_no_checks_name, params = @api.cmd_raw_no_checks("INST COLLECT with TYPE 0, DURATION 5")
369
- target_name.should eql 'INST'
370
- cmd_no_checks_name.should eql 'COLLECT'
371
- params.should include('TYPE'=>0, 'DURATION'=>5)
369
+ expect(target_name).to eql 'INST'
370
+ expect(cmd_no_checks_name).to eql 'COLLECT'
371
+ expect(params).to include('TYPE'=>0, 'DURATION'=>5)
372
372
  end
373
373
 
374
- it "should process parameters" do
374
+ it "processes parameters" do
375
375
  target_name, cmd_no_checks_name, params = @api.cmd_raw_no_checks("INST","COLLECT","TYPE"=>0,"DURATION"=>5)
376
- target_name.should eql 'INST'
377
- cmd_no_checks_name.should eql 'COLLECT'
378
- params.should include('TYPE'=>0, 'DURATION'=>5)
376
+ expect(target_name).to eql 'INST'
377
+ expect(cmd_no_checks_name).to eql 'COLLECT'
378
+ expect(params).to include('TYPE'=>0, 'DURATION'=>5)
379
379
  end
380
380
 
381
- it "should warn about required parameters" do
381
+ it "warns about required parameters" do
382
382
  expect { @api.cmd_raw_no_checks("INST COLLECT with DURATION 5") }.to raise_error(/Required/)
383
383
  end
384
384
 
385
- it "should not warn about out of range parameters" do
385
+ it "does not warn about out of range parameters" do
386
386
  expect { @api.cmd_raw_no_checks("INST COLLECT with TYPE 0, DURATION 1000") }.to_not raise_error
387
387
  end
388
388
 
389
- it "should not warn about hazardous parameters" do
389
+ it "does not warn about hazardous parameters" do
390
390
  expect { @api.cmd_raw_no_checks("INST COLLECT with TYPE 1") }.to_not raise_error
391
391
  end
392
392
 
393
- it "should not warn about hazardous commands" do
393
+ it "does not warn about hazardous commands" do
394
394
  expect { @api.cmd_raw_no_checks("INST CLEAR") }.to_not raise_error
395
395
  end
396
396
  end
397
397
 
398
398
  describe "get_cmd_list" do
399
- it "should return command names sorted" do
399
+ it "returns command names sorted" do
400
400
  result = @api.get_cmd_list("INST")
401
- result.sort.should eql result
401
+ expect(result.sort).to eql result
402
402
  end
403
403
 
404
- it "should complain with a unknown target" do
404
+ it "complains with a unknown target" do
405
405
  expect { @api.get_cmd_list("BLAH") }.to raise_error(/does not exist/)
406
406
  end
407
407
 
408
- it "should return command names and descriptions for a given target" do
408
+ it "returns command names and descriptions for a given target" do
409
409
  result = @api.get_cmd_list("INST")
410
- result[0][0].should eql "ABORT"
410
+ expect(result[0][0]).to eql "ABORT"
411
411
  # The second parameter is the description ... only test one
412
- result[0][1].should eql "Aborts a collect on the instrument"
413
- result[1][0].should eql "ARYCMD"
414
- result[2][0].should eql "ASCIICMD"
415
- result[3][0].should eql "CLEAR"
416
- result[4][0].should eql "COLLECT"
417
- result[5][0].should eql "COSMOS_ERROR_HANDLE"
418
- result[6][0].should eql "COSMOS_ERROR_IGNORE"
419
- result[7][0].should eql "COSMOS_HANDSHAKE_DS"
420
- result[8][0].should eql "COSMOS_HANDSHAKE_EN"
421
- result[9][0].should eql "FLTCMD"
422
- result[10][0].should eql "LINC_COMMAND"
423
- result[11][0].should eql "SETPARAMS"
424
- result[12][0].should eql "SLRPNLDEPLOY"
425
- result[13][0].should eql "SLRPNLRESET"
412
+ expect(result[0][1]).to eql "Aborts a collect on the instrument"
413
+ expect(result[1][0]).to eql "ARYCMD"
414
+ expect(result[2][0]).to eql "ASCIICMD"
415
+ expect(result[3][0]).to eql "CLEAR"
416
+ expect(result[4][0]).to eql "COLLECT"
417
+ expect(result[5][0]).to eql "COSMOS_ERROR_HANDLE"
418
+ expect(result[6][0]).to eql "COSMOS_ERROR_IGNORE"
419
+ expect(result[7][0]).to eql "COSMOS_HANDSHAKE_DS"
420
+ expect(result[8][0]).to eql "COSMOS_HANDSHAKE_EN"
421
+ expect(result[9][0]).to eql "FLTCMD"
422
+ expect(result[10][0]).to eql "LINC_COMMAND"
423
+ expect(result[11][0]).to eql "SETPARAMS"
424
+ expect(result[12][0]).to eql "SLRPNLDEPLOY"
425
+ expect(result[13][0]).to eql "SLRPNLRESET"
426
426
  end
427
427
  end
428
428
 
429
429
  describe "get_cmd_param_list" do
430
- it "should return parameters for the command" do
430
+ it "returns parameters for the command" do
431
431
  result = @api.get_cmd_param_list("INST","COLLECT")
432
432
  # Each element in the results array contains:
433
433
  # name, default, states, description, full units, units, required
434
- result.should include ['TYPE',0,{"NORMAL"=>0,"SPECIAL"=>1},'Collect type',nil,nil,true]
435
- result.should include ['TEMP',0.0,nil,'Collect temperature','Celcius','C',false]
434
+ expect(result).to include ['TYPE',0,{"NORMAL"=>0,"SPECIAL"=>1},'Collect type',nil,nil,true]
435
+ expect(result).to include ['TEMP',0.0,nil,'Collect temperature','Celcius','C',false]
436
436
  end
437
437
 
438
- it "should return array parameters for the command" do
438
+ it "returns array parameters for the command" do
439
439
  result = @api.get_cmd_param_list("INST","ARYCMD")
440
440
  # Each element in the results array contains:
441
441
  # name, default, states, description, full units, units, required
442
- result.should include ['ARRAY',[],nil,'Array parameter',nil,nil,false]
442
+ expect(result).to include ['ARRAY',[],nil,'Array parameter',nil,nil,false]
443
443
  end
444
444
  end
445
445
 
446
446
  describe "get_cmd_hazardous" do
447
- it "should return whether the command with parameters is hazardous" do
448
- @api.get_cmd_hazardous("INST","COLLECT",{"TYPE"=>"NORMAL"}).should be_falsey
449
- @api.get_cmd_hazardous("INST","COLLECT",{"TYPE"=>"SPECIAL"}).should be_truthy
447
+ it "returns whether the command with parameters is hazardous" do
448
+ expect(@api.get_cmd_hazardous("INST","COLLECT",{"TYPE"=>"NORMAL"})).to be_falsey
449
+ expect(@api.get_cmd_hazardous("INST","COLLECT",{"TYPE"=>"SPECIAL"})).to be_truthy
450
450
  end
451
451
 
452
- it "should return whether the command is hazardous" do
453
- @api.get_cmd_hazardous("INST","CLEAR").should be_truthy
452
+ it "returns whether the command is hazardous" do
453
+ expect(@api.get_cmd_hazardous("INST","CLEAR")).to be_truthy
454
454
  end
455
455
  end
456
456
 
@@ -464,80 +464,80 @@ module Cosmos
464
464
  end
465
465
 
466
466
  describe "tlm" do
467
- it "should complain about unknown targets, commands, and parameters" do
467
+ it "complains about unknown targets, commands, and parameters" do
468
468
  test_tlm_unknown(:tlm)
469
469
  end
470
470
 
471
- it "should process a string" do
471
+ it "processes a string" do
472
472
  value = @api.tlm("INST HEALTH_STATUS TEMP1")
473
- value.should eql -100.0
473
+ expect(value).to eql -100.0
474
474
  end
475
475
 
476
- it "should process parameters" do
476
+ it "processes parameters" do
477
477
  value = @api.tlm("INST","HEALTH_STATUS","TEMP1")
478
478
  end
479
479
 
480
- it "should complain if too many parameters" do
480
+ it "complains if too many parameters" do
481
481
  expect { @api.tlm("INST","HEALTH_STATUS","TEMP1","TEMP2") }.to raise_error(/Invalid number of arguments/)
482
482
  end
483
483
  end
484
484
 
485
485
  describe "tlm_raw" do
486
- it "should complain about unknown targets, commands, and parameters" do
486
+ it "complains about unknown targets, commands, and parameters" do
487
487
  test_tlm_unknown(:tlm_raw)
488
488
  end
489
489
 
490
- it "should process a string" do
491
- @api.tlm_raw("INST HEALTH_STATUS TEMP1").should eql 0
490
+ it "processes a string" do
491
+ expect(@api.tlm_raw("INST HEALTH_STATUS TEMP1")).to eql 0
492
492
  end
493
493
 
494
- it "should return the value using LATEST" do
495
- @api.tlm_raw("INST LATEST TEMP1").should eql 0
494
+ it "returns the value using LATEST" do
495
+ expect(@api.tlm_raw("INST LATEST TEMP1")).to eql 0
496
496
  end
497
497
 
498
- it "should process parameters" do
499
- @api.tlm_raw("INST","HEALTH_STATUS","TEMP1").should eql 0
498
+ it "processes parameters" do
499
+ expect(@api.tlm_raw("INST","HEALTH_STATUS","TEMP1")).to eql 0
500
500
  end
501
501
  end
502
502
 
503
503
  describe "tlm_formatted" do
504
- it "should complain about unknown targets, commands, and parameters" do
504
+ it "complains about unknown targets, commands, and parameters" do
505
505
  test_tlm_unknown(:tlm_formatted)
506
506
  end
507
507
 
508
- it "should process a string" do
509
- @api.tlm_formatted("INST HEALTH_STATUS TEMP1").should eql "-100.000"
508
+ it "processes a string" do
509
+ expect(@api.tlm_formatted("INST HEALTH_STATUS TEMP1")).to eql "-100.000"
510
510
  end
511
511
 
512
- it "should return the value using LATEST" do
513
- @api.tlm_formatted("INST LATEST TEMP1").should eql "-100.000"
512
+ it "returns the value using LATEST" do
513
+ expect(@api.tlm_formatted("INST LATEST TEMP1")).to eql "-100.000"
514
514
  end
515
515
 
516
- it "should process parameters" do
517
- @api.tlm_formatted("INST","HEALTH_STATUS","TEMP1").should eql "-100.000"
516
+ it "processes parameters" do
517
+ expect(@api.tlm_formatted("INST","HEALTH_STATUS","TEMP1")).to eql "-100.000"
518
518
  end
519
519
  end
520
520
 
521
521
  describe "tlm_with_units" do
522
- it "should complain about unknown targets, commands, and parameters" do
522
+ it "complains about unknown targets, commands, and parameters" do
523
523
  test_tlm_unknown(:tlm_with_units)
524
524
  end
525
525
 
526
- it "should process a string" do
527
- @api.tlm_with_units("INST HEALTH_STATUS TEMP1").should eql "-100.000 C"
526
+ it "processes a string" do
527
+ expect(@api.tlm_with_units("INST HEALTH_STATUS TEMP1")).to eql "-100.000 C"
528
528
  end
529
529
 
530
- it "should return the value using LATEST" do
531
- @api.tlm_with_units("INST LATEST TEMP1").should eql "-100.000 C"
530
+ it "returns the value using LATEST" do
531
+ expect(@api.tlm_with_units("INST LATEST TEMP1")).to eql "-100.000 C"
532
532
  end
533
533
 
534
- it "should process parameters" do
535
- @api.tlm_with_units("INST","HEALTH_STATUS","TEMP1").should eql "-100.000 C"
534
+ it "processes parameters" do
535
+ expect(@api.tlm_with_units("INST","HEALTH_STATUS","TEMP1")).to eql "-100.000 C"
536
536
  end
537
537
  end
538
538
 
539
539
  describe "tlm_variable" do
540
- it "should complain about unknown targets, commands, and parameters" do
540
+ it "complains about unknown targets, commands, and parameters" do
541
541
  expect { @api.tlm_variable("BLAH HEALTH_STATUS COLLECTS",:RAW) }.to raise_error(/does not exist/)
542
542
  expect { @api.tlm_variable("INST UNKNOWN COLLECTS",:RAW) }.to raise_error(/does not exist/)
543
543
  expect { @api.tlm_variable("INST HEALTH_STATUS BLAH",:RAW) }.to raise_error(/does not exist/)
@@ -546,34 +546,34 @@ module Cosmos
546
546
  expect { @api.tlm_variable("INST","HEALTH_STATUS","BLAH",:RAW) }.to raise_error(/does not exist/)
547
547
  end
548
548
 
549
- it "should process a string" do
550
- @api.tlm_variable("INST HEALTH_STATUS TEMP1",:CONVERTED).should eql -100.0
551
- @api.tlm_variable("INST HEALTH_STATUS TEMP1",:RAW).should eql 0
552
- @api.tlm_variable("INST HEALTH_STATUS TEMP1",:FORMATTED).should eql "-100.000"
553
- @api.tlm_variable("INST HEALTH_STATUS TEMP1",:WITH_UNITS).should eql "-100.000 C"
549
+ it "processes a string" do
550
+ expect(@api.tlm_variable("INST HEALTH_STATUS TEMP1",:CONVERTED)).to eql -100.0
551
+ expect(@api.tlm_variable("INST HEALTH_STATUS TEMP1",:RAW)).to eql 0
552
+ expect(@api.tlm_variable("INST HEALTH_STATUS TEMP1",:FORMATTED)).to eql "-100.000"
553
+ expect(@api.tlm_variable("INST HEALTH_STATUS TEMP1",:WITH_UNITS)).to eql "-100.000 C"
554
554
  end
555
555
 
556
- it "should return the value using LATEST" do
557
- @api.tlm_variable("INST LATEST TEMP1",:CONVERTED).should eql -100.0
558
- @api.tlm_variable("INST LATEST TEMP1",:RAW).should eql 0
559
- @api.tlm_variable("INST LATEST TEMP1",:FORMATTED).should eql "-100.000"
560
- @api.tlm_variable("INST LATEST TEMP1",:WITH_UNITS).should eql "-100.000 C"
556
+ it "returns the value using LATEST" do
557
+ expect(@api.tlm_variable("INST LATEST TEMP1",:CONVERTED)).to eql -100.0
558
+ expect(@api.tlm_variable("INST LATEST TEMP1",:RAW)).to eql 0
559
+ expect(@api.tlm_variable("INST LATEST TEMP1",:FORMATTED)).to eql "-100.000"
560
+ expect(@api.tlm_variable("INST LATEST TEMP1",:WITH_UNITS)).to eql "-100.000 C"
561
561
  end
562
562
 
563
- it "should process parameters" do
564
- @api.tlm_variable("INST","HEALTH_STATUS","TEMP1",:CONVERTED).should eql -100.0
565
- @api.tlm_variable("INST","HEALTH_STATUS","TEMP1",:RAW).should eql 0
566
- @api.tlm_variable("INST","HEALTH_STATUS","TEMP1",:FORMATTED).should eql "-100.000"
567
- @api.tlm_variable("INST","HEALTH_STATUS","TEMP1",:WITH_UNITS).should eql "-100.000 C"
563
+ it "processes parameters" do
564
+ expect(@api.tlm_variable("INST","HEALTH_STATUS","TEMP1",:CONVERTED)).to eql -100.0
565
+ expect(@api.tlm_variable("INST","HEALTH_STATUS","TEMP1",:RAW)).to eql 0
566
+ expect(@api.tlm_variable("INST","HEALTH_STATUS","TEMP1",:FORMATTED)).to eql "-100.000"
567
+ expect(@api.tlm_variable("INST","HEALTH_STATUS","TEMP1",:WITH_UNITS)).to eql "-100.000 C"
568
568
  end
569
569
 
570
- it "should complain with too many parameters" do
570
+ it "complains with too many parameters" do
571
571
  expect { @api.tlm_variable("INST","HEALTH_STATUS","TEMP1","TEMP2",:CONVERTED) }.to raise_error(/Invalid number of arguments/)
572
572
  end
573
573
  end
574
574
 
575
575
  describe "set_tlm" do
576
- it "should complain about unknown targets, commands, and parameters" do
576
+ it "complains about unknown targets, commands, and parameters" do
577
577
  expect { @api.set_tlm("BLAH HEALTH_STATUS COLLECTS = 1") }.to raise_error(/does not exist/)
578
578
  expect { @api.set_tlm("INST UNKNOWN COLLECTS = 1") }.to raise_error(/does not exist/)
579
579
  expect { @api.set_tlm("INST HEALTH_STATUS BLAH = 1") }.to raise_error(/does not exist/)
@@ -582,23 +582,23 @@ module Cosmos
582
582
  expect { @api.set_tlm("INST","HEALTH_STATUS","BLAH",1) }.to raise_error(/does not exist/)
583
583
  end
584
584
 
585
- it "should process a string" do
585
+ it "processes a string" do
586
586
  @api.set_tlm("INST HEALTH_STATUS TEMP1 = 0.0")
587
- @api.tlm("INST HEALTH_STATUS TEMP1").should be_within(0.00001).of(-0.05759)
587
+ expect(@api.tlm("INST HEALTH_STATUS TEMP1")).to be_within(0.00001).of(-0.05759)
588
588
  end
589
589
 
590
- it "should process parameters" do
590
+ it "processes parameters" do
591
591
  @api.set_tlm("INST","HEALTH_STATUS","TEMP1", 0.0)
592
- @api.tlm("INST HEALTH_STATUS TEMP1").should be_within(0.00001).of(-0.05759)
592
+ expect(@api.tlm("INST HEALTH_STATUS TEMP1")).to be_within(0.00001).of(-0.05759)
593
593
  end
594
594
 
595
- it "should complain with too many parameters" do
595
+ it "complains with too many parameters" do
596
596
  expect { @api.set_tlm("INST","HEALTH_STATUS","TEMP1","TEMP2",0.0) }.to raise_error(/Invalid number of arguments/)
597
597
  end
598
598
  end
599
599
 
600
600
  describe "set_tlm_raw" do
601
- it "should complain about unknown targets, commands, and parameters" do
601
+ it "complains about unknown targets, commands, and parameters" do
602
602
  expect { @api.set_tlm_raw("BLAH HEALTH_STATUS COLLECTS = 1") }.to raise_error(/does not exist/)
603
603
  expect { @api.set_tlm_raw("INST UNKNOWN COLLECTS = 1") }.to raise_error(/does not exist/)
604
604
  expect { @api.set_tlm_raw("INST HEALTH_STATUS BLAH = 1") }.to raise_error(/does not exist/)
@@ -607,156 +607,156 @@ module Cosmos
607
607
  expect { @api.set_tlm_raw("INST","HEALTH_STATUS","BLAH",1) }.to raise_error(/does not exist/)
608
608
  end
609
609
 
610
- it "should process a string" do
610
+ it "processes a string" do
611
611
  @api.set_tlm_raw("INST HEALTH_STATUS TEMP1 = 0.0")
612
- @api.tlm("INST HEALTH_STATUS TEMP1").should eql -100.0
612
+ expect(@api.tlm("INST HEALTH_STATUS TEMP1")).to eql -100.0
613
613
  end
614
614
 
615
- it "should process parameters" do
615
+ it "processes parameters" do
616
616
  @api.set_tlm_raw("INST","HEALTH_STATUS","TEMP1", 0.0)
617
- @api.tlm("INST HEALTH_STATUS TEMP1").should eql -100.0
617
+ expect(@api.tlm("INST HEALTH_STATUS TEMP1")).to eql -100.0
618
618
  end
619
619
  end
620
620
 
621
621
  describe "get_tlm_packet" do
622
- it "should complain about non-existant targets" do
622
+ it "complains about non-existant targets" do
623
623
  expect { @api.get_tlm_packet("BLAH","HEALTH_STATUS") }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
624
624
  end
625
625
 
626
- it "should complain about non-existant packets" do
626
+ it "complains about non-existant packets" do
627
627
  expect { @api.get_tlm_packet("INST","BLAH") }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
628
628
  end
629
629
 
630
- it "should complain using LATEST" do
630
+ it "complains using LATEST" do
631
631
  expect { @api.get_tlm_packet("INST","LATEST") }.to raise_error(RuntimeError, "Telemetry packet 'INST LATEST' does not exist")
632
632
  end
633
633
 
634
- it "should complain about non-existant value_types" do
634
+ it "complains about non-existant value_types" do
635
635
  expect { @api.get_tlm_packet("INST","HEALTH_STATUS",:MINE) }.to raise_error(ArgumentError, "Unknown value type on read: MINE")
636
636
  end
637
637
 
638
- it "should read all telemetry items with their limits states" do
638
+ it "reads all telemetry items with their limits states" do
639
639
  vals = @api.get_tlm_packet("INST","HEALTH_STATUS")
640
- vals[0][0].should eql "RECEIVED_TIMESECONDS"
641
- vals[0][1].should eql 0.0
642
- vals[0][2].should be_nil
643
- vals[1][0].should eql "RECEIVED_TIMEFORMATTED"
644
- vals[1][1].should eql "No Packet Received Time"
645
- vals[1][2].should be_nil
646
- vals[2][0].should eql "RECEIVED_COUNT"
647
- vals[2][1].should eql 0
648
- vals[2][2].should be_nil
640
+ expect(vals[0][0]).to eql "RECEIVED_TIMESECONDS"
641
+ expect(vals[0][1]).to eql 0.0
642
+ expect(vals[0][2]).to be_nil
643
+ expect(vals[1][0]).to eql "RECEIVED_TIMEFORMATTED"
644
+ expect(vals[1][1]).to eql "No Packet Received Time"
645
+ expect(vals[1][2]).to be_nil
646
+ expect(vals[2][0]).to eql "RECEIVED_COUNT"
647
+ expect(vals[2][1]).to eql 0
648
+ expect(vals[2][2]).to be_nil
649
649
  # Spot check a few more
650
- vals[22][0].should eql "TEMP1"
651
- vals[22][1].should eql -100.0
652
- vals[22][2].should eql :RED_LOW
653
- vals[23][0].should eql "TEMP2"
654
- vals[23][1].should eql -100.0
655
- vals[23][2].should eql :RED_LOW
656
- vals[24][0].should eql "TEMP3"
657
- vals[24][1].should eql -100.0
658
- vals[24][2].should eql :RED_LOW
659
- vals[25][0].should eql "TEMP4"
660
- vals[25][1].should eql -100.0
661
- vals[25][2].should eql :RED_LOW
650
+ expect(vals[22][0]).to eql "TEMP1"
651
+ expect(vals[22][1]).to eql -100.0
652
+ expect(vals[22][2]).to eql :RED_LOW
653
+ expect(vals[23][0]).to eql "TEMP2"
654
+ expect(vals[23][1]).to eql -100.0
655
+ expect(vals[23][2]).to eql :RED_LOW
656
+ expect(vals[24][0]).to eql "TEMP3"
657
+ expect(vals[24][1]).to eql -100.0
658
+ expect(vals[24][2]).to eql :RED_LOW
659
+ expect(vals[25][0]).to eql "TEMP4"
660
+ expect(vals[25][1]).to eql -100.0
661
+ expect(vals[25][2]).to eql :RED_LOW
662
662
  end
663
663
  end
664
664
 
665
665
  describe "get_tlm_values" do
666
- it "should handle an empty request" do
667
- @api.get_tlm_values([]).should eql [[], [], [], :DEFAULT]
666
+ it "handles an empty request" do
667
+ expect(@api.get_tlm_values([])).to eql [[], [], [], :DEFAULT]
668
668
  end
669
669
 
670
- it "should complain about non-existant targets" do
670
+ it "complains about non-existant targets" do
671
671
  expect { @api.get_tlm_values([["BLAH","HEALTH_STATUS","TEMP1"]]) }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
672
672
  end
673
673
 
674
- it "should complain about non-existant packets" do
674
+ it "complains about non-existant packets" do
675
675
  expect { @api.get_tlm_values([["INST","BLAH","TEMP1"]]) }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
676
676
  end
677
677
 
678
- it "should complain about non-existant items" do
678
+ it "complains about non-existant items" do
679
679
  expect { @api.get_tlm_values([["INST","LATEST","BLAH"]]) }.to raise_error(RuntimeError, "Telemetry item 'INST LATEST BLAH' does not exist")
680
680
  end
681
681
 
682
- it "should complain about non-existant value_types" do
682
+ it "complains about non-existant value_types" do
683
683
  expect { @api.get_tlm_values([["INST","HEALTH_STATUS","TEMP1"]],:MINE) }.to raise_error(ArgumentError, "Unknown value type on read: MINE")
684
684
  end
685
685
 
686
- it "should complain about bad arguments" do
686
+ it "complains about bad arguments" do
687
687
  expect { @api.get_tlm_values("INST",:MINE) }.to raise_error(ArgumentError, /item_array must be nested array/)
688
688
  expect { @api.get_tlm_values(["INST","HEALTH_STATUS","TEMP1"],:MINE) }.to raise_error(ArgumentError, /item_array must be nested array/)
689
689
  expect { @api.get_tlm_values([["INST","HEALTH_STATUS","TEMP1"]],10) }.to raise_error(ArgumentError, /value_types must be a single symbol or array of symbols/)
690
690
  expect { @api.get_tlm_values([["INST","HEALTH_STATUS","TEMP1"]],[10]) }.to raise_error(ArgumentError, /value_types must be a single symbol or array of symbols/)
691
691
  end
692
692
 
693
- it "should read all the specified items" do
693
+ it "reads all the specified items" do
694
694
  items = []
695
695
  items << %w(INST HEALTH_STATUS TEMP1)
696
696
  items << %w(INST HEALTH_STATUS TEMP2)
697
697
  items << %w(INST HEALTH_STATUS TEMP3)
698
698
  items << %w(INST HEALTH_STATUS TEMP4)
699
699
  vals = @api.get_tlm_values(items)
700
- vals[0][0].should eql -100.0
701
- vals[0][1].should eql -100.0
702
- vals[0][2].should eql -100.0
703
- vals[0][3].should eql -100.0
704
- vals[1][0].should eql :RED_LOW
705
- vals[1][1].should eql :RED_LOW
706
- vals[1][2].should eql :RED_LOW
707
- vals[1][3].should eql :RED_LOW
708
- vals[2][0].should eql [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
709
- vals[2][1].should eql [-60.0, -55.0, 30.0, 35.0]
710
- vals[2][2].should eql [-25.0, -10.0, 50.0, 55.0]
711
- vals[2][3].should eql [-80.0, -70.0, 60.0, 80.0]
712
- vals[3].should eql :DEFAULT
713
- end
714
-
715
- it "should read all the specified items with one conversion" do
700
+ expect(vals[0][0]).to eql -100.0
701
+ expect(vals[0][1]).to eql -100.0
702
+ expect(vals[0][2]).to eql -100.0
703
+ expect(vals[0][3]).to eql -100.0
704
+ expect(vals[1][0]).to eql :RED_LOW
705
+ expect(vals[1][1]).to eql :RED_LOW
706
+ expect(vals[1][2]).to eql :RED_LOW
707
+ expect(vals[1][3]).to eql :RED_LOW
708
+ expect(vals[2][0]).to eql [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
709
+ expect(vals[2][1]).to eql [-60.0, -55.0, 30.0, 35.0]
710
+ expect(vals[2][2]).to eql [-25.0, -10.0, 50.0, 55.0]
711
+ expect(vals[2][3]).to eql [-80.0, -70.0, 60.0, 80.0]
712
+ expect(vals[3]).to eql :DEFAULT
713
+ end
714
+
715
+ it "reads all the specified items with one conversion" do
716
716
  items = []
717
717
  items << %w(INST HEALTH_STATUS TEMP1)
718
718
  items << %w(INST HEALTH_STATUS TEMP2)
719
719
  items << %w(INST HEALTH_STATUS TEMP3)
720
720
  items << %w(INST HEALTH_STATUS TEMP4)
721
721
  vals = @api.get_tlm_values(items, :RAW)
722
- vals[0][0].should eql 0
723
- vals[0][1].should eql 0
724
- vals[0][2].should eql 0
725
- vals[0][3].should eql 0
726
- vals[1][0].should eql :RED_LOW
727
- vals[1][1].should eql :RED_LOW
728
- vals[1][2].should eql :RED_LOW
729
- vals[1][3].should eql :RED_LOW
730
- vals[2][0].should eql [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
731
- vals[2][1].should eql [-60.0, -55.0, 30.0, 35.0]
732
- vals[2][2].should eql [-25.0, -10.0, 50.0, 55.0]
733
- vals[2][3].should eql [-80.0, -70.0, 60.0, 80.0]
734
- vals[3].should eql :DEFAULT
735
- end
736
-
737
- it "should read all the specified items with different conversions" do
722
+ expect(vals[0][0]).to eql 0
723
+ expect(vals[0][1]).to eql 0
724
+ expect(vals[0][2]).to eql 0
725
+ expect(vals[0][3]).to eql 0
726
+ expect(vals[1][0]).to eql :RED_LOW
727
+ expect(vals[1][1]).to eql :RED_LOW
728
+ expect(vals[1][2]).to eql :RED_LOW
729
+ expect(vals[1][3]).to eql :RED_LOW
730
+ expect(vals[2][0]).to eql [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
731
+ expect(vals[2][1]).to eql [-60.0, -55.0, 30.0, 35.0]
732
+ expect(vals[2][2]).to eql [-25.0, -10.0, 50.0, 55.0]
733
+ expect(vals[2][3]).to eql [-80.0, -70.0, 60.0, 80.0]
734
+ expect(vals[3]).to eql :DEFAULT
735
+ end
736
+
737
+ it "reads all the specified items with different conversions" do
738
738
  items = []
739
739
  items << %w(INST HEALTH_STATUS TEMP1)
740
740
  items << %w(INST HEALTH_STATUS TEMP2)
741
741
  items << %w(INST HEALTH_STATUS TEMP3)
742
742
  items << %w(INST HEALTH_STATUS TEMP4)
743
743
  vals = @api.get_tlm_values(items, [:RAW, :CONVERTED, :FORMATTED, :WITH_UNITS])
744
- vals[0][0].should eql 0
745
- vals[0][1].should eql -100.0
746
- vals[0][2].should eql "-100.000"
747
- vals[0][3].should eql "-100.000 C"
748
- vals[1][0].should eql :RED_LOW
749
- vals[1][1].should eql :RED_LOW
750
- vals[1][2].should eql :RED_LOW
751
- vals[1][3].should eql :RED_LOW
752
- vals[2][0].should eql [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
753
- vals[2][1].should eql [-60.0, -55.0, 30.0, 35.0]
754
- vals[2][2].should eql [-25.0, -10.0, 50.0, 55.0]
755
- vals[2][3].should eql [-80.0, -70.0, 60.0, 80.0]
756
- vals[3].should eql :DEFAULT
757
- end
758
-
759
- it "should complain if items length != conversions length" do
744
+ expect(vals[0][0]).to eql 0
745
+ expect(vals[0][1]).to eql -100.0
746
+ expect(vals[0][2]).to eql "-100.000"
747
+ expect(vals[0][3]).to eql "-100.000 C"
748
+ expect(vals[1][0]).to eql :RED_LOW
749
+ expect(vals[1][1]).to eql :RED_LOW
750
+ expect(vals[1][2]).to eql :RED_LOW
751
+ expect(vals[1][3]).to eql :RED_LOW
752
+ expect(vals[2][0]).to eql [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
753
+ expect(vals[2][1]).to eql [-60.0, -55.0, 30.0, 35.0]
754
+ expect(vals[2][2]).to eql [-25.0, -10.0, 50.0, 55.0]
755
+ expect(vals[2][3]).to eql [-80.0, -70.0, 60.0, 80.0]
756
+ expect(vals[3]).to eql :DEFAULT
757
+ end
758
+
759
+ it "complains if items length != conversions length" do
760
760
  items = []
761
761
  items << %w(INST HEALTH_STATUS TEMP1)
762
762
  items << %w(INST HEALTH_STATUS TEMP2)
@@ -767,251 +767,251 @@ module Cosmos
767
767
  end
768
768
 
769
769
  describe "get_tlm_list" do
770
- it "should complain about non-existant targets" do
770
+ it "complains about non-existant targets" do
771
771
  expect { @api.get_tlm_list("BLAH") }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
772
772
  end
773
773
 
774
- it "should return the sorted packet names for a target" do
774
+ it "returns the sorted packet names for a target" do
775
775
  pkts = @api.get_tlm_list("INST")
776
- pkts[0][0].should eql "ADCS"
777
- pkts[1][0].should eql "ERROR"
778
- pkts[2][0].should eql "HANDSHAKE"
779
- pkts[3][0].should eql "HEALTH_STATUS"
780
- pkts[4][0].should eql "IMAGE"
781
- pkts[5][0].should eql "MECH"
782
- pkts[6][0].should eql "PARAMS"
776
+ expect(pkts[0][0]).to eql "ADCS"
777
+ expect(pkts[1][0]).to eql "ERROR"
778
+ expect(pkts[2][0]).to eql "HANDSHAKE"
779
+ expect(pkts[3][0]).to eql "HEALTH_STATUS"
780
+ expect(pkts[4][0]).to eql "IMAGE"
781
+ expect(pkts[5][0]).to eql "MECH"
782
+ expect(pkts[6][0]).to eql "PARAMS"
783
783
  end
784
784
  end
785
785
 
786
786
  describe "get_tlm_item_list" do
787
- it "should complain about non-existant targets" do
787
+ it "complains about non-existant targets" do
788
788
  expect { @api.get_tlm_item_list("BLAH","HEALTH_STATUS") }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
789
789
  end
790
790
 
791
- it "should complain about non-existant packets" do
791
+ it "complains about non-existant packets" do
792
792
  expect { @api.get_tlm_item_list("INST","BLAH") }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
793
793
  end
794
794
 
795
- it "should return all the items for a target/packet" do
795
+ it "returns all the items for a target/packet" do
796
796
  items = @api.get_tlm_item_list("INST","HEALTH_STATUS")
797
- items[0][0].should eql "RECEIVED_TIMESECONDS"
798
- items[1][0].should eql "RECEIVED_TIMEFORMATTED"
799
- items[2][0].should eql "RECEIVED_COUNT"
797
+ expect(items[0][0]).to eql "RECEIVED_TIMESECONDS"
798
+ expect(items[1][0]).to eql "RECEIVED_TIMEFORMATTED"
799
+ expect(items[2][0]).to eql "RECEIVED_COUNT"
800
800
  # Spot check a few more
801
- items[22][0].should eql "TEMP1"
802
- items[22][1].should be_nil
803
- items[22][2].should eql "Temperature #1"
804
- items[28][0].should eql "COLLECT_TYPE"
805
- items[28][1].should include("NORMAL"=>0, "SPECIAL"=>1)
806
- items[28][2].should eql "Most recent collect type"
801
+ expect(items[22][0]).to eql "TEMP1"
802
+ expect(items[22][1]).to be_nil
803
+ expect(items[22][2]).to eql "Temperature #1"
804
+ expect(items[28][0]).to eql "COLLECT_TYPE"
805
+ expect(items[28][1]).to include("NORMAL"=>0, "SPECIAL"=>1)
806
+ expect(items[28][2]).to eql "Most recent collect type"
807
807
  end
808
808
  end
809
809
 
810
810
  describe "get_tlm_details" do
811
- it "should complain about non-existant targets" do
811
+ it "complains about non-existant targets" do
812
812
  expect { @api.get_tlm_details([["BLAH","HEALTH_STATUS","TEMP1"]]) }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
813
813
  end
814
814
 
815
- it "should complain about non-existant packets" do
815
+ it "complains about non-existant packets" do
816
816
  expect { @api.get_tlm_details([["INST","BLAH","TEMP1"]]) }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
817
817
  end
818
818
 
819
- it "should complain about non-existant items" do
819
+ it "complains about non-existant items" do
820
820
  expect { @api.get_tlm_details([["INST","LATEST","BLAH"]]) }.to raise_error(RuntimeError, "Telemetry item 'INST LATEST BLAH' does not exist")
821
821
  end
822
822
 
823
- it "should complain about bad parameters" do
823
+ it "complains about bad parameters" do
824
824
  expect { @api.get_tlm_details("INST") }.to raise_error(ArgumentError, /item_array must be nested array/)
825
825
  expect { @api.get_tlm_details(["INST","LATEST","BLAH"]) }.to raise_error(ArgumentError, /item_array must be nested array/)
826
826
  end
827
827
 
828
- it "should read all the specified items" do
828
+ it "reads all the specified items" do
829
829
  items = []
830
830
  items << %w(INST HEALTH_STATUS TEMP1)
831
831
  items << %w(INST HEALTH_STATUS TEMP2)
832
832
  items << %w(INST HEALTH_STATUS TEMP3)
833
833
  items << %w(INST HEALTH_STATUS TEMP4)
834
834
  details = @api.get_tlm_details(items)
835
- details.length.should eql 4
836
- details[0]["name"].should eql "TEMP1"
837
- details[1]["name"].should eql "TEMP2"
838
- details[2]["name"].should eql "TEMP3"
839
- details[3]["name"].should eql "TEMP4"
835
+ expect(details.length).to eql 4
836
+ expect(details[0]["name"]).to eql "TEMP1"
837
+ expect(details[1]["name"]).to eql "TEMP2"
838
+ expect(details[2]["name"]).to eql "TEMP3"
839
+ expect(details[3]["name"]).to eql "TEMP4"
840
840
  end
841
841
  end
842
842
 
843
843
  describe "get_out_of_limits" do
844
- it "should return all out of limits items" do
844
+ it "returns all out of limits items" do
845
845
  items = @api.get_out_of_limits
846
846
  (0..3).each do |i|
847
- items[i][0].should eql "INST"
848
- items[i][1].should eql "HEALTH_STATUS"
849
- items[i][2].should eql "TEMP#{i+1}"
850
- items[i][3].should eql :RED_LOW
847
+ expect(items[i][0]).to eql "INST"
848
+ expect(items[i][1]).to eql "HEALTH_STATUS"
849
+ expect(items[i][2]).to eql "TEMP#{i+1}"
850
+ expect(items[i][3]).to eql :RED_LOW
851
851
  end
852
852
  end
853
853
  end
854
854
 
855
855
  describe "limits_enabled?" do
856
- it "should complain about non-existant targets" do
856
+ it "complains about non-existant targets" do
857
857
  expect { @api.limits_enabled?("BLAH","HEALTH_STATUS","TEMP1") }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
858
858
  end
859
859
 
860
- it "should complain about non-existant packets" do
860
+ it "complains about non-existant packets" do
861
861
  expect { @api.limits_enabled?("INST","BLAH","TEMP1") }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
862
862
  end
863
863
 
864
- it "should complain about non-existant items" do
864
+ it "complains about non-existant items" do
865
865
  expect { @api.limits_enabled?("INST","HEALTH_STATUS","BLAH") }.to raise_error(RuntimeError, "Packet item 'INST HEALTH_STATUS BLAH' does not exist")
866
866
  end
867
867
 
868
- it "should return whether limits are enable for an item" do
869
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_truthy
868
+ it "returns whether limits are enable for an item" do
869
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_truthy
870
870
  end
871
871
  end
872
872
 
873
873
  describe "enable_limits" do
874
- it "should complain about non-existant targets" do
874
+ it "complains about non-existant targets" do
875
875
  expect { @api.enable_limits("BLAH","HEALTH_STATUS","TEMP1") }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
876
876
  end
877
877
 
878
- it "should complain about non-existant packets" do
878
+ it "complains about non-existant packets" do
879
879
  expect { @api.enable_limits("INST","BLAH","TEMP1") }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
880
880
  end
881
881
 
882
- it "should complain about non-existant items" do
882
+ it "complains about non-existant items" do
883
883
  expect { @api.enable_limits("INST","HEALTH_STATUS","BLAH") }.to raise_error(RuntimeError, "Packet item 'INST HEALTH_STATUS BLAH' does not exist")
884
884
  end
885
885
 
886
- it "should enable limits for an item" do
887
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_truthy
886
+ it "enables limits for an item" do
887
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_truthy
888
888
  @api.disable_limits("INST","HEALTH_STATUS","TEMP1")
889
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_falsey
889
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_falsey
890
890
  @api.enable_limits("INST","HEALTH_STATUS","TEMP1")
891
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_truthy
891
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_truthy
892
892
  end
893
893
  end
894
894
 
895
895
  describe "disable_limits" do
896
- it "should complain about non-existant targets" do
896
+ it "complains about non-existant targets" do
897
897
  expect { @api.disable_limits("BLAH","HEALTH_STATUS","TEMP1") }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
898
898
  end
899
899
 
900
- it "should complain about non-existant packets" do
900
+ it "complains about non-existant packets" do
901
901
  expect { @api.disable_limits("INST","BLAH","TEMP1") }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
902
902
  end
903
903
 
904
- it "should complain about non-existant items" do
904
+ it "complains about non-existant items" do
905
905
  expect { @api.disable_limits("INST","HEALTH_STATUS","BLAH") }.to raise_error(RuntimeError, "Packet item 'INST HEALTH_STATUS BLAH' does not exist")
906
906
  end
907
907
 
908
- it "should disable limits for an item" do
909
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_truthy
908
+ it "disables limits for an item" do
909
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_truthy
910
910
  @api.disable_limits("INST","HEALTH_STATUS","TEMP1")
911
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_falsey
911
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_falsey
912
912
  @api.enable_limits("INST","HEALTH_STATUS","TEMP1")
913
913
  end
914
914
  end
915
915
 
916
916
  describe "get_limits" do
917
- it "should complain about non-existant targets" do
917
+ it "complains about non-existant targets" do
918
918
  expect { @api.get_limits("BLAH","HEALTH_STATUS","TEMP1") }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
919
919
  end
920
920
 
921
- it "should complain about non-existant packets" do
921
+ it "complains about non-existant packets" do
922
922
  expect { @api.get_limits("INST","BLAH","TEMP1") }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
923
923
  end
924
924
 
925
- it "should complain about non-existant items" do
925
+ it "complains about non-existant items" do
926
926
  expect { @api.get_limits("INST","HEALTH_STATUS","BLAH") }.to raise_error(RuntimeError, "Packet item 'INST HEALTH_STATUS BLAH' does not exist")
927
927
  end
928
928
 
929
- it "should get limits for an item" do
930
- @api.get_limits("INST","HEALTH_STATUS","TEMP1").should eql([:DEFAULT, 1, true, -80.0, -70.0, 60.0, 80.0, -20.0, 20.0])
931
- @api.get_limits("INST","HEALTH_STATUS","TEMP1",:TVAC).should eql([:TVAC, 1, true, -80.0, -30.0, 30.0, 80.0, nil, nil])
929
+ it "gets limits for an item" do
930
+ expect(@api.get_limits("INST","HEALTH_STATUS","TEMP1")).to eql([:DEFAULT, 1, true, -80.0, -70.0, 60.0, 80.0, -20.0, 20.0])
931
+ expect(@api.get_limits("INST","HEALTH_STATUS","TEMP1",:TVAC)).to eql([:TVAC, 1, true, -80.0, -30.0, 30.0, 80.0, nil, nil])
932
932
  end
933
933
  end
934
934
 
935
935
  describe "set_limits" do
936
- it "should complain about non-existant targets" do
936
+ it "complains about non-existant targets" do
937
937
  expect { @api.set_limits("BLAH","HEALTH_STATUS","TEMP1",0.0,10.0,20.0,30.0) }.to raise_error(RuntimeError, "Telemetry target 'BLAH' does not exist")
938
938
  end
939
939
 
940
- it "should complain about non-existant packets" do
940
+ it "complains about non-existant packets" do
941
941
  expect { @api.set_limits("INST","BLAH","TEMP1",0.0,10.0,20.0,30.0) }.to raise_error(RuntimeError, "Telemetry packet 'INST BLAH' does not exist")
942
942
  end
943
943
 
944
- it "should complain about non-existant items" do
944
+ it "complains about non-existant items" do
945
945
  expect { @api.set_limits("INST","HEALTH_STATUS","BLAH",0.0,10.0,20.0,30.0) }.to raise_error(RuntimeError, "Packet item 'INST HEALTH_STATUS BLAH' does not exist")
946
946
  end
947
947
 
948
- it "should get limits for an item" do
949
- @api.set_limits("INST","HEALTH_STATUS","TEMP1",0.0,10.0,20.0,30.0).should eql([:CUSTOM, 1, true, 0.0, 10.0, 20.0, 30.0, nil, nil])
950
- @api.set_limits("INST","HEALTH_STATUS","TEMP1",0.0,10.0,20.0,30.0,12.0,15.0,:CUSTOM2,2,false).should eql([:CUSTOM2, 2, false, 0.0, 10.0, 20.0, 30.0, 12.0, 15.0])
951
- @api.set_limits("INST","HEALTH_STATUS","TEMP1",0.0,10.0,20.0,30.0,12.0,15.0,:CUSTOM,1,true).should eql([:CUSTOM, 1, true, 0.0, 10.0, 20.0, 30.0, 12.0, 15.0])
948
+ it "gets limits for an item" do
949
+ expect(@api.set_limits("INST","HEALTH_STATUS","TEMP1",0.0,10.0,20.0,30.0)).to eql([:CUSTOM, 1, true, 0.0, 10.0, 20.0, 30.0, nil, nil])
950
+ expect(@api.set_limits("INST","HEALTH_STATUS","TEMP1",0.0,10.0,20.0,30.0,12.0,15.0,:CUSTOM2,2,false)).to eql([:CUSTOM2, 2, false, 0.0, 10.0, 20.0, 30.0, 12.0, 15.0])
951
+ expect(@api.set_limits("INST","HEALTH_STATUS","TEMP1",0.0,10.0,20.0,30.0,12.0,15.0,:CUSTOM,1,true)).to eql([:CUSTOM, 1, true, 0.0, 10.0, 20.0, 30.0, 12.0, 15.0])
952
952
  end
953
953
  end
954
954
 
955
955
  describe "get_limits_groups" do
956
- it "should return all the limits groups" do
957
- @api.get_limits_groups.should eql %w(FIRST SECOND)
956
+ it "returns all the limits groups" do
957
+ expect(@api.get_limits_groups).to eql %w(FIRST SECOND)
958
958
  end
959
959
  end
960
960
 
961
961
  describe "enable_limits_group" do
962
- it "should complain about undefined limits groups" do
962
+ it "complains about undefined limits groups" do
963
963
  expect { @api.enable_limits_group("MINE") }.to raise_error(RuntimeError, "LIMITS_GROUP MINE undefined. Ensure your telemetry definition contains the line: LIMITS_GROUP MINE")
964
964
  end
965
965
 
966
- it "should enable limits for all items in the group" do
966
+ it "enables limits for all items in the group" do
967
967
  @api.disable_limits("INST","HEALTH_STATUS","TEMP1")
968
968
  @api.disable_limits("INST","HEALTH_STATUS","TEMP3")
969
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_falsey
970
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP3").should be_falsey
969
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_falsey
970
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP3")).to be_falsey
971
971
  @api.enable_limits_group("FIRST")
972
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_truthy
973
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP3").should be_truthy
972
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_truthy
973
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP3")).to be_truthy
974
974
  end
975
975
  end
976
976
 
977
977
  describe "disable_limits_group" do
978
- it "should complain about undefined limits groups" do
978
+ it "complains about undefined limits groups" do
979
979
  expect { @api.disable_limits_group("MINE") }.to raise_error(RuntimeError, "LIMITS_GROUP MINE undefined. Ensure your telemetry definition contains the line: LIMITS_GROUP MINE")
980
980
  end
981
981
 
982
- it "should disable limits for all items in the group" do
982
+ it "disables limits for all items in the group" do
983
983
  @api.enable_limits("INST","HEALTH_STATUS","TEMP1")
984
984
  @api.enable_limits("INST","HEALTH_STATUS","TEMP3")
985
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_truthy
986
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP3").should be_truthy
985
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_truthy
986
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP3")).to be_truthy
987
987
  @api.disable_limits_group("FIRST")
988
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP1").should be_falsey
989
- @api.limits_enabled?("INST","HEALTH_STATUS","TEMP3").should be_falsey
988
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP1")).to be_falsey
989
+ expect(@api.limits_enabled?("INST","HEALTH_STATUS","TEMP3")).to be_falsey
990
990
  end
991
991
  end
992
992
 
993
993
  describe "get_limits_sets, get_limits_set, set_limits_set" do
994
- it "should get and set the active limits set" do
994
+ it "gets and set the active limits set" do
995
995
  if @api.get_limits_sets.include?(:CUSTOM)
996
- @api.get_limits_sets.should eql [:DEFAULT,:TVAC, :CUSTOM, :CUSTOM2]
996
+ expect(@api.get_limits_sets).to eql [:DEFAULT,:TVAC, :CUSTOM, :CUSTOM2]
997
997
  else
998
- @api.get_limits_sets.should eql [:DEFAULT,:TVAC]
998
+ expect(@api.get_limits_sets).to eql [:DEFAULT,:TVAC]
999
999
  end
1000
1000
  @api.set_limits_set("TVAC")
1001
- @api.get_limits_set.should eql "TVAC"
1001
+ expect(@api.get_limits_set).to eql "TVAC"
1002
1002
  @api.set_limits_set("DEFAULT")
1003
- @api.get_limits_set.should eql "DEFAULT"
1003
+ expect(@api.get_limits_set).to eql "DEFAULT"
1004
1004
  end
1005
1005
  end
1006
1006
 
1007
1007
  describe "get_target_list" do
1008
- it "should return all target names" do
1009
- @api.get_target_list.should eql %w(COSMOS INST META SYSTEM)
1008
+ it "returns all target names" do
1009
+ expect(@api.get_target_list).to eql %w(COSMOS INST META SYSTEM)
1010
1010
  end
1011
1011
  end
1012
1012
 
1013
1013
  describe "subscribe_limits_events" do
1014
- it "should call CmdTlmServer" do
1014
+ it "calls CmdTlmServer" do
1015
1015
  stub_const("Cosmos::CmdTlmServer::DEFAULT_LIMITS_EVENT_QUEUE_SIZE", 100)
1016
1016
  expect(CmdTlmServer).to receive(:subscribe_limits_events)
1017
1017
  @api.subscribe_limits_events
@@ -1019,21 +1019,21 @@ module Cosmos
1019
1019
  end
1020
1020
 
1021
1021
  describe "unsubscribe_limits_events" do
1022
- it "should call CmdTlmServer" do
1022
+ it "calls CmdTlmServer" do
1023
1023
  expect(CmdTlmServer).to receive(:unsubscribe_limits_events)
1024
1024
  @api.unsubscribe_limits_events(0)
1025
1025
  end
1026
1026
  end
1027
1027
 
1028
1028
  describe "get_limits_event" do
1029
- it "should get a limits event" do
1029
+ it "gets a limits event" do
1030
1030
  expect(CmdTlmServer).to receive(:get_limits_event)
1031
1031
  @api.get_limits_event(0)
1032
1032
  end
1033
1033
  end
1034
1034
 
1035
1035
  describe "subscribe_packet_data" do
1036
- it "should call CmdTlmServer" do
1036
+ it "calls CmdTlmServer" do
1037
1037
  stub_const("Cosmos::CmdTlmServer::DEFAULT_PACKET_DATA_QUEUE_SIZE", 100)
1038
1038
  expect(CmdTlmServer).to receive(:subscribe_packet_data)
1039
1039
  @api.subscribe_packet_data([["TGT","PKT1"],["TGT","PKT2"]])
@@ -1041,14 +1041,14 @@ module Cosmos
1041
1041
  end
1042
1042
 
1043
1043
  describe "unsubscribe_packet_datas" do
1044
- it "should call CmdTlmServer" do
1044
+ it "calls CmdTlmServer" do
1045
1045
  expect(CmdTlmServer).to receive(:unsubscribe_packet_data)
1046
1046
  @api.unsubscribe_packet_data(10)
1047
1047
  end
1048
1048
  end
1049
1049
 
1050
1050
  describe "get_packet_data" do
1051
- it "should call CmdTlmServer" do
1051
+ it "calls CmdTlmServer" do
1052
1052
  expect(CmdTlmServer).to receive(:get_packet_data)
1053
1053
  @api.get_packet_data(10)
1054
1054
  end
@@ -1058,7 +1058,7 @@ module Cosmos
1058
1058
  # adding any functionality. Thus we just test that they are are received
1059
1059
  # by the CmdTlmServer.
1060
1060
  describe "CmdTlmServer pass-throughs" do
1061
- it "should call through to the CmdTlmServer" do
1061
+ it "calls through to the CmdTlmServer" do
1062
1062
  @api.get_interface_names
1063
1063
  @api.connect_interface("INT")
1064
1064
  @api.disconnect_interface("INT")