cosmos 3.2.1 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -16,21 +16,21 @@ module Cosmos
16
16
  describe NewPacketLogProcessor do
17
17
 
18
18
  describe "initialize" do
19
- it "should take a packet log writer name" do
19
+ it "takes a packet log writer name" do
20
20
  a = NewPacketLogProcessor.new('MINE')
21
- a.value_type.should eql :CONVERTED
21
+ expect(a.value_type).to eql :CONVERTED
22
22
  end
23
23
  end
24
24
 
25
25
  describe "call" do
26
- it "should start logging" do
26
+ it "starts logging" do
27
27
  log_name = nil
28
28
  allow(CmdTlmServer).to receive_message_chain(:instance,:start_logging) do |name|
29
29
  log_name = name
30
30
  end
31
31
  a = NewPacketLogProcessor.new()
32
32
  a.call(nil, nil)
33
- log_name.should eql('ALL')
33
+ expect(log_name).to eql('ALL')
34
34
  end
35
35
  end
36
36
 
@@ -16,36 +16,36 @@ module Cosmos
16
16
  describe Processor do
17
17
 
18
18
  describe "initialize" do
19
- it "should store an optional value_type" do
19
+ it "stores an optional value_type" do
20
20
  a = Processor.new(:RAW)
21
- a.value_type.should eql :RAW
21
+ expect(a.value_type).to eql :RAW
22
22
  b = Processor.new
23
- b.value_type.should eql :CONVERTED
23
+ expect(b.value_type).to eql :CONVERTED
24
24
  end
25
25
  end
26
26
 
27
27
  describe "call" do
28
- it "should raise an exception" do
28
+ it "raises an exception" do
29
29
  expect { Processor.new.call(0, 0) }.to raise_error("call method must be defined by subclass")
30
30
  end
31
31
  end
32
32
 
33
33
  describe "to_s" do
34
- it "should return a String" do
35
- Processor.new.to_s.should eql "Processor"
34
+ it "returns a String" do
35
+ expect(Processor.new.to_s).to eql "Processor"
36
36
  end
37
37
  end
38
38
 
39
39
  describe "name" do
40
- it "should have an assignable name" do
40
+ it "has an assignable name" do
41
41
  a = Processor.new
42
42
  a.name = "Test"
43
- a.name.should eql "TEST"
43
+ expect(a.name).to eql "TEST"
44
44
  end
45
45
  end
46
46
 
47
47
  describe "reset" do
48
- it "should have a reset method" do
48
+ it "has a reset method" do
49
49
  a = Processor.new
50
50
  expect { a.reset }.not_to raise_error
51
51
  end
@@ -17,42 +17,42 @@ module Cosmos
17
17
  describe StatisticsProcessor do
18
18
 
19
19
  describe "initialize" do
20
- it "should take an item_name, samples_to_average, and value_type" do
20
+ it "takes an item_name, samples_to_average, and value_type" do
21
21
  p = StatisticsProcessor.new('TEST', '5', 'RAW')
22
- p.value_type.should eql :RAW
23
- p.instance_variable_get("@item_name").should eql 'TEST'
24
- p.instance_variable_get("@samples_to_average").should eql 5
22
+ expect(p.value_type).to eql :RAW
23
+ expect(p.instance_variable_get("@item_name")).to eql 'TEST'
24
+ expect(p.instance_variable_get("@samples_to_average")).to eql 5
25
25
  end
26
26
  end
27
27
 
28
28
  describe "call and reset" do
29
- it "should generate statistics" do
29
+ it "generates statistics" do
30
30
  p = StatisticsProcessor.new('TEST', '5', 'RAW')
31
31
  packet = Packet.new("tgt","pkt")
32
32
  packet.append_item("TEST", 8, :UINT)
33
33
  packet.buffer= "\x01"
34
34
  p.call(packet, packet.buffer)
35
- p.results[:MAX].should eql 1
36
- p.results[:MIN].should eql 1
37
- p.results[:MEAN].should be_within(0.001).of(1.0)
38
- p.results[:STDDEV].should be_within(0.001).of(0.0)
35
+ expect(p.results[:MAX]).to eql 1
36
+ expect(p.results[:MIN]).to eql 1
37
+ expect(p.results[:MEAN]).to be_within(0.001).of(1.0)
38
+ expect(p.results[:STDDEV]).to be_within(0.001).of(0.0)
39
39
  packet.buffer= "\x02"
40
40
  p.call(packet, packet.buffer)
41
- p.results[:MAX].should eql 2
42
- p.results[:MIN].should eql 1
43
- p.results[:MEAN].should be_within(0.001).of(1.5)
44
- p.results[:STDDEV].should be_within(0.001).of(0.7071)
41
+ expect(p.results[:MAX]).to eql 2
42
+ expect(p.results[:MIN]).to eql 1
43
+ expect(p.results[:MEAN]).to be_within(0.001).of(1.5)
44
+ expect(p.results[:STDDEV]).to be_within(0.001).of(0.7071)
45
45
  packet.buffer= "\x00"
46
46
  p.call(packet, packet.buffer)
47
- p.results[:MAX].should eql 2
48
- p.results[:MIN].should eql 0
49
- p.results[:MEAN].should be_within(0.001).of(1.0)
50
- p.results[:STDDEV].should be_within(0.001).of(1.0)
47
+ expect(p.results[:MAX]).to eql 2
48
+ expect(p.results[:MIN]).to eql 0
49
+ expect(p.results[:MEAN]).to be_within(0.001).of(1.0)
50
+ expect(p.results[:STDDEV]).to be_within(0.001).of(1.0)
51
51
  p.reset
52
- p.results[:MAX].should eql nil
53
- p.results[:MIN].should eql nil
54
- p.results[:MEAN].should eql nil
55
- p.results[:STDDEV].should eql nil
52
+ expect(p.results[:MAX]).to eql nil
53
+ expect(p.results[:MIN]).to eql nil
54
+ expect(p.results[:MEAN]).to eql nil
55
+ expect(p.results[:STDDEV]).to eql nil
56
56
  end
57
57
  end
58
58
  end
@@ -17,33 +17,33 @@ module Cosmos
17
17
  describe WatermarkProcessor do
18
18
 
19
19
  describe "initialize" do
20
- it "should take an item_name and value_type" do
20
+ it "takes an item_name and value_type" do
21
21
  p = WatermarkProcessor.new('TEST', 'RAW')
22
- p.value_type.should eql :RAW
23
- p.instance_variable_get("@item_name").should eql 'TEST'
22
+ expect(p.value_type).to eql :RAW
23
+ expect(p.instance_variable_get("@item_name")).to eql 'TEST'
24
24
  end
25
25
  end
26
26
 
27
27
  describe "call and reset" do
28
- it "should generate a high and low water mark" do
28
+ it "generates a high and low water mark" do
29
29
  p = WatermarkProcessor.new('TEST', 'RAW')
30
30
  packet = Packet.new("tgt","pkt")
31
31
  packet.append_item("TEST", 8, :UINT)
32
32
  packet.buffer= "\x01"
33
33
  p.call(packet, packet.buffer)
34
- p.results[:HIGH_WATER].should eql 1
35
- p.results[:LOW_WATER].should eql 1
34
+ expect(p.results[:HIGH_WATER]).to eql 1
35
+ expect(p.results[:LOW_WATER]).to eql 1
36
36
  packet.buffer= "\x02"
37
37
  p.call(packet, packet.buffer)
38
- p.results[:HIGH_WATER].should eql 2
39
- p.results[:LOW_WATER].should eql 1
38
+ expect(p.results[:HIGH_WATER]).to eql 2
39
+ expect(p.results[:LOW_WATER]).to eql 1
40
40
  packet.buffer= "\x00"
41
41
  p.call(packet, packet.buffer)
42
- p.results[:HIGH_WATER].should eql 2
43
- p.results[:LOW_WATER].should eql 0
42
+ expect(p.results[:HIGH_WATER]).to eql 2
43
+ expect(p.results[:LOW_WATER]).to eql 0
44
44
  p.reset
45
- p.results[:HIGH_WATER].should eql nil
46
- p.results[:LOW_WATER].should eql nil
45
+ expect(p.results[:HIGH_WATER]).to eql nil
46
+ expect(p.results[:LOW_WATER]).to eql nil
47
47
  end
48
48
  end
49
49
  end
@@ -53,166 +53,166 @@ module Cosmos
53
53
  end
54
54
 
55
55
  describe "cmd" do
56
- it "should send a command" do
56
+ it "sends a command" do
57
57
  capture_io do |stdout|
58
58
  cmd("INST ABORT")
59
- stdout.string.should match /cmd\(\'INST ABORT\'\)/ #'
59
+ expect(stdout.string).to match /cmd\(\'INST ABORT\'\)/ #'
60
60
  end
61
61
  end
62
62
 
63
- it "should check parameter ranges" do
63
+ it "checks parameter ranges" do
64
64
  expect { cmd("INST COLLECT with TYPE NORMAL, DURATION 20") }.to raise_error(/Command parameter 'INST COLLECT DURATION' = 20 not in valid range/)
65
65
  end
66
66
 
67
- it "should prompt for a hazardous command" do
67
+ it "prompts for a hazardous command" do
68
68
  capture_io do |stdout|
69
69
  expect(self).to receive(:gets) { 'y' } # Send hazardous command
70
70
  cmd("INST COLLECT with TYPE SPECIAL")
71
71
 
72
- stdout.string.should match "Warning: Command INST COLLECT is Hazardous"
73
- stdout.string.should match /cmd\(\'INST COLLECT/ # '
72
+ expect(stdout.string).to match "Warning: Command INST COLLECT is Hazardous"
73
+ expect(stdout.string).to match /cmd\(\'INST COLLECT/ # '
74
74
  stdout.rewind
75
75
 
76
76
  expect(self).to receive(:gets) { 'n' } # Don't send hazardous
77
77
  expect(self).to receive(:gets) { 'y' } # Stop running script
78
78
  cmd("INST COLLECT with TYPE SPECIAL")
79
- stdout.string.should match "Warning: Command INST COLLECT is Hazardous"
79
+ expect(stdout.string).to match "Warning: Command INST COLLECT is Hazardous"
80
80
  end
81
81
  end
82
82
  end
83
83
 
84
84
  describe "cmd_no_range_check" do
85
- it "should send an out of range command" do
85
+ it "sends an out of range command" do
86
86
  expect { cmd_no_range_check("INST COLLECT with TYPE NORMAL, DURATION 20") }.to_not raise_error
87
87
  end
88
88
 
89
- it "should prompt for a hazardous command" do
89
+ it "prompts for a hazardous command" do
90
90
  capture_io do |stdout|
91
91
  expect(self).to receive(:gets) { 'y' } # Send hazardous command
92
92
  cmd_no_range_check("INST COLLECT with TYPE SPECIAL")
93
93
 
94
- stdout.string.should match "Warning: Command INST COLLECT is Hazardous"
95
- stdout.string.should match /cmd\(\'INST COLLECT/ # '
94
+ expect(stdout.string).to match "Warning: Command INST COLLECT is Hazardous"
95
+ expect(stdout.string).to match /cmd\(\'INST COLLECT/ # '
96
96
  stdout.rewind
97
97
 
98
98
  expect(self).to receive(:gets) { 'n' } # Don't send hazardous
99
99
  expect(self).to receive(:gets) { 'y' } # Stop running script
100
100
  cmd_no_range_check("INST COLLECT with TYPE SPECIAL")
101
- stdout.string.should match "Warning: Command INST COLLECT is Hazardous"
101
+ expect(stdout.string).to match "Warning: Command INST COLLECT is Hazardous"
102
102
  end
103
103
  end
104
104
  end
105
105
 
106
106
  describe "cmd_no_hazardous_check" do
107
- it "should check parameter ranges" do
107
+ it "checks parameter ranges" do
108
108
  expect { cmd_no_hazardous_check("INST COLLECT with TYPE SPECIAL, DURATION 20") }.to raise_error(/Command parameter 'INST COLLECT DURATION' = 20 not in valid range/)
109
109
  end
110
110
 
111
- it "should send a hazardous command without prompting" do
111
+ it "sends a hazardous command without prompting" do
112
112
  capture_io do |stdout|
113
113
  cmd_no_hazardous_check("INST COLLECT with TYPE SPECIAL")
114
114
 
115
- stdout.string.should match "Command INST COLLECT being sent ignoring hazardous warnings"
116
- stdout.string.should match /cmd\(\'INST COLLECT/ # '
115
+ expect(stdout.string).to match "Command INST COLLECT being sent ignoring hazardous warnings"
116
+ expect(stdout.string).to match /cmd\(\'INST COLLECT/ # '
117
117
  end
118
118
  end
119
119
  end
120
120
 
121
121
  describe "cmd_no_checks" do
122
- it "should send an out of range hazardous command without prompting" do
122
+ it "sends an out of range hazardous command without prompting" do
123
123
  capture_io do |stdout|
124
124
  cmd_no_checks("INST COLLECT with TYPE SPECIAL, DURATION 20")
125
125
 
126
- stdout.string.should match "Command INST COLLECT being sent ignoring hazardous warnings"
127
- stdout.string.should match /cmd\(\'INST COLLECT/ # '
126
+ expect(stdout.string).to match "Command INST COLLECT being sent ignoring hazardous warnings"
127
+ expect(stdout.string).to match /cmd\(\'INST COLLECT/ # '
128
128
  end
129
129
  end
130
130
  end
131
131
 
132
132
  describe "cmd_raw" do
133
- it "should send a command" do
133
+ it "sends a command" do
134
134
  capture_io do |stdout|
135
135
  cmd_raw("INST ABORT")
136
- stdout.string.should match /cmd_raw\(\'INST ABORT\'\)/ # '
136
+ expect(stdout.string).to match /cmd_raw\(\'INST ABORT\'\)/ # '
137
137
  end
138
138
  end
139
139
 
140
- it "should check parameter ranges" do
140
+ it "checks parameter ranges" do
141
141
  expect { cmd_raw("INST COLLECT with TYPE 0, DURATION 20") }.to raise_error(/Command parameter 'INST COLLECT DURATION' = 20 not in valid range/) # '
142
142
  end
143
143
 
144
- it "should prompt for a hazardous command" do
144
+ it "prompts for a hazardous command" do
145
145
  capture_io do |stdout|
146
146
  expect(self).to receive(:gets) { 'y' } # Send hazardous command
147
147
  cmd_raw("INST COLLECT with TYPE 1")
148
148
 
149
- stdout.string.should match "Warning: Command INST COLLECT is Hazardous"
150
- stdout.string.should match /cmd_raw\(\'INST COLLECT/ # '
149
+ expect(stdout.string).to match "Warning: Command INST COLLECT is Hazardous"
150
+ expect(stdout.string).to match /cmd_raw\(\'INST COLLECT/ # '
151
151
  stdout.rewind
152
152
 
153
153
  expect(self).to receive(:gets) { 'n' } # Don't send hazardous
154
154
  expect(self).to receive(:gets) { 'y' } # Stop running script
155
155
  cmd_raw("INST COLLECT with TYPE 1")
156
- stdout.string.should match "Warning: Command INST COLLECT is Hazardous"
156
+ expect(stdout.string).to match "Warning: Command INST COLLECT is Hazardous"
157
157
  end
158
158
  end
159
159
  end
160
160
 
161
161
  describe "cmd_raw_no_range_check" do
162
- it "should send an out of range command" do
162
+ it "sends an out of range command" do
163
163
  expect { cmd_raw_no_range_check("INST COLLECT with TYPE 0, DURATION 20") }.to_not raise_error
164
164
  end
165
165
 
166
- it "should prompt for a hazardous command" do
166
+ it "prompts for a hazardous command" do
167
167
  capture_io do |stdout|
168
168
  expect(self).to receive(:gets) { 'y' } # Send hazardous command
169
169
  cmd_raw_no_range_check("INST COLLECT with TYPE 1")
170
170
 
171
- stdout.string.should match "Warning: Command INST COLLECT is Hazardous"
172
- stdout.string.should match /cmd_raw\(\'INST COLLECT/ # '
171
+ expect(stdout.string).to match "Warning: Command INST COLLECT is Hazardous"
172
+ expect(stdout.string).to match /cmd_raw\(\'INST COLLECT/ # '
173
173
  stdout.rewind
174
174
 
175
175
  expect(self).to receive(:gets) { 'n' } # Don't send hazardous
176
176
  expect(self).to receive(:gets) { 'y' } # Stop running script
177
177
  cmd_raw_no_range_check("INST COLLECT with TYPE 1")
178
- stdout.string.should match "Warning: Command INST COLLECT is Hazardous"
178
+ expect(stdout.string).to match "Warning: Command INST COLLECT is Hazardous"
179
179
  end
180
180
  end
181
181
  end
182
182
 
183
183
  describe "cmd_raw_no_hazardous_check" do
184
- it "should check parameter ranges" do
184
+ it "checks parameter ranges" do
185
185
  expect { cmd_raw_no_hazardous_check("INST COLLECT with TYPE 1, DURATION 20") }.to raise_error(/Command parameter 'INST COLLECT DURATION' = 20 not in valid range/)
186
186
  end
187
187
 
188
- it "should send a hazardous command without prompting" do
188
+ it "sends a hazardous command without prompting" do
189
189
  capture_io do |stdout|
190
190
  cmd_raw_no_hazardous_check("INST COLLECT with TYPE 1")
191
- stdout.string.should match "Command INST COLLECT being sent ignoring hazardous warnings"
192
- stdout.string.should match /cmd_raw\(\'INST COLLECT/ #'
191
+ expect(stdout.string).to match "Command INST COLLECT being sent ignoring hazardous warnings"
192
+ expect(stdout.string).to match /cmd_raw\(\'INST COLLECT/ #'
193
193
  end
194
194
  end
195
195
  end
196
196
 
197
197
  describe "cmd_raw_no_checks" do
198
- it "should send an out of range hazardous command without prompting" do
198
+ it "sends an out of range hazardous command without prompting" do
199
199
  capture_io do |stdout|
200
200
  cmd_raw_no_checks("INST COLLECT with TYPE 1, DURATION 20")
201
- stdout.string.should match "Command INST COLLECT being sent ignoring hazardous warnings"
202
- stdout.string.should match /cmd_raw\(\'INST COLLECT/ #'
201
+ expect(stdout.string).to match "Command INST COLLECT being sent ignoring hazardous warnings"
202
+ expect(stdout.string).to match /cmd_raw\(\'INST COLLECT/ #'
203
203
  end
204
204
  end
205
205
  end
206
206
 
207
207
  describe "send_raw" do
208
- it "should send data to the write_raw interface method" do
208
+ it "sends data to the write_raw interface method" do
209
209
  expect_any_instance_of(Interface).to receive(:write_raw).with('\x00')
210
210
  send_raw('INST_INT', '\x00')
211
211
  end
212
212
  end
213
213
 
214
214
  describe "send_raw_file" do
215
- it "should send file data to the write_raw interface method" do
215
+ it "sends file data to the write_raw interface method" do
216
216
  file = File.open('raw_test_file.bin','wb')
217
217
  file.write '\x00\x01\x02\x03'
218
218
  file.close
@@ -226,36 +226,36 @@ module Cosmos
226
226
  end
227
227
 
228
228
  describe "get_cmd_list" do
229
- it "should return all the target commands" do
229
+ it "returns all the target commands" do
230
230
  list = get_cmd_list("INST")
231
231
  # Only check for the collect command to make this test list dependent
232
232
  # on the demo INST command definition file
233
- list.should include(["COLLECT", "Starts a collect on the instrument"])
233
+ expect(list).to include(["COLLECT", "Starts a collect on the instrument"])
234
234
  end
235
235
  end
236
236
 
237
237
  describe "get_cmd_param_list" do
238
- it "should return all the parameters for a command" do
238
+ it "returns all the parameters for a command" do
239
239
  list = get_cmd_param_list("INST", "COLLECT")
240
- list.should include(["TYPE", 0, {"NORMAL"=>0, "SPECIAL"=>1}, "Collect type", nil, nil, true])
240
+ expect(list).to include(["TYPE", 0, {"NORMAL"=>0, "SPECIAL"=>1}, "Collect type", nil, nil, true])
241
241
  end
242
242
  end
243
243
 
244
244
  describe "get_cmd_hazardous" do
245
- it "should return whether a command is hazardous" do
246
- get_cmd_hazardous("INST", "COLLECT", {"TYPE"=>"NORMAL"}).should be_falsey
247
- get_cmd_hazardous("INST", "COLLECT", {"TYPE"=>"SPECIAL"}).should be_truthy
245
+ it "returns whether a command is hazardous" do
246
+ expect(get_cmd_hazardous("INST", "COLLECT", {"TYPE"=>"NORMAL"})).to be_falsey
247
+ expect(get_cmd_hazardous("INST", "COLLECT", {"TYPE"=>"SPECIAL"})).to be_truthy
248
248
  end
249
249
  end
250
250
 
251
251
  describe "tlm, tlm_raw, tlm_formatted, tlm_with_units, tlm_variable, set_tlm, set_tlm_raw" do
252
- it "should pass through to the cmd_tlm_server" do
252
+ it "passes through to the cmd_tlm_server" do
253
253
  expect {
254
- tlm("INST HEALTH_STATUS TEMP1").should eql -100.0
255
- tlm_raw("INST HEALTH_STATUS TEMP1").should eql 0
256
- tlm_formatted("INST HEALTH_STATUS TEMP1").should eql "-100.000"
257
- tlm_with_units("INST HEALTH_STATUS TEMP1").should eql "-100.000 C"
258
- tlm_variable("INST HEALTH_STATUS TEMP1", :RAW).should eql 0
254
+ expect(tlm("INST HEALTH_STATUS TEMP1")).to eql -100.0
255
+ expect(tlm_raw("INST HEALTH_STATUS TEMP1")).to eql 0
256
+ expect(tlm_formatted("INST HEALTH_STATUS TEMP1")).to eql "-100.000"
257
+ expect(tlm_with_units("INST HEALTH_STATUS TEMP1")).to eql "-100.000 C"
258
+ expect(tlm_variable("INST HEALTH_STATUS TEMP1", :RAW)).to eql 0
259
259
  set_tlm("INST HEALTH_STATUS TEMP1 = 1")
260
260
  set_tlm_raw("INST HEALTH_STATUS TEMP1 = 0")
261
261
  }.to_not raise_error
@@ -263,53 +263,53 @@ module Cosmos
263
263
  end
264
264
 
265
265
  describe "get_tlm_packet" do
266
- it "should get the packet values" do
267
- get_tlm_packet("INST", "HEALTH_STATUS", :RAW).should include(["TEMP1", 0, :RED_LOW])
266
+ it "gets the packet values" do
267
+ expect(get_tlm_packet("INST", "HEALTH_STATUS", :RAW)).to include(["TEMP1", 0, :RED_LOW])
268
268
  end
269
269
  end
270
270
 
271
271
  describe "get_tlm_values" do
272
- it "should get the given values" do
272
+ it "gets the given values" do
273
273
  vals = get_tlm_values([["INST", "HEALTH_STATUS", "TEMP1"], ["INST", "HEALTH_STATUS", "TEMP2"]])
274
- vals[0][0].should eql -100.0
275
- vals[1][0].should eql :RED_LOW
276
- vals[2][0].should eql [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
277
- vals[3].should eql :DEFAULT
274
+ expect(vals[0][0]).to eql -100.0
275
+ expect(vals[1][0]).to eql :RED_LOW
276
+ expect(vals[2][0]).to eql [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
277
+ expect(vals[3]).to eql :DEFAULT
278
278
  end
279
279
  end
280
280
 
281
281
  describe "get_tlm_list" do
282
- it "should get packets for a given target" do
283
- get_tlm_list("INST").should include(["HEALTH_STATUS", "Health and status from the instrument"])
282
+ it "gets packets for a given target" do
283
+ expect(get_tlm_list("INST")).to include(["HEALTH_STATUS", "Health and status from the instrument"])
284
284
  end
285
285
  end
286
286
 
287
287
  describe "get_tlm_item_list" do
288
- it "should get telemetry for a given packet" do
289
- get_tlm_item_list("INST", "HEALTH_STATUS").should include(["TEMP1",nil,"Temperature #1"])
288
+ it "gets telemetry for a given packet" do
289
+ expect(get_tlm_item_list("INST", "HEALTH_STATUS")).to include(["TEMP1",nil,"Temperature #1"])
290
290
  end
291
291
  end
292
292
 
293
293
  describe "get_tlm_details" do
294
- it "should get telemetry for a given packet" do
294
+ it "gets telemetry for a given packet" do
295
295
  details = get_tlm_details([["INST", "HEALTH_STATUS", "TEMP1"], ["INST", "HEALTH_STATUS", "TEMP2"]])
296
- details[0]["name"].should eql "TEMP1"
297
- details[1]["name"].should eql "TEMP2"
296
+ expect(details[0]["name"]).to eql "TEMP1"
297
+ expect(details[1]["name"]).to eql "TEMP2"
298
298
  end
299
299
  end
300
300
 
301
301
  describe "get_out_of_limits" do
302
- it "should get all out of limits items" do
303
- get_out_of_limits.should include(["INST","HEALTH_STATUS","TEMP1",:RED_LOW])
302
+ it "gets all out of limits items" do
303
+ expect(get_out_of_limits).to include(["INST","HEALTH_STATUS","TEMP1",:RED_LOW])
304
304
  end
305
305
  end
306
306
 
307
307
  describe "get_overall_limits_state" do
308
- it "should get the overall limits state of the system" do
309
- get_overall_limits_state.should eql :RED
308
+ it "gets the overall limits state of the system" do
309
+ expect(get_overall_limits_state).to eql :RED
310
310
  end
311
311
 
312
- it "should ignore specified items" do
312
+ it "ignores specified items" do
313
313
  ignore = []
314
314
  ignore << %w(INST HEALTH_STATUS TEMP1)
315
315
  ignore << %w(INST HEALTH_STATUS TEMP2)
@@ -317,106 +317,106 @@ module Cosmos
317
317
  ignore << %w(INST HEALTH_STATUS TEMP4)
318
318
  ignore << %w(INST HEALTH_STATUS GROUND1STATUS)
319
319
  ignore << %w(INST HEALTH_STATUS GROUND2STATUS)
320
- get_overall_limits_state(ignore).should eql :STALE
320
+ expect(get_overall_limits_state(ignore)).to eql :STALE
321
321
  end
322
322
  end
323
323
 
324
324
  describe "limits_enabled?, disable_limits, enable_limits" do
325
- it "should enable, disable, and check limits for an item" do
326
- limits_enabled?("INST HEALTH_STATUS TEMP1").should be_truthy
325
+ it "enables, disable, and check limits for an item" do
326
+ expect(limits_enabled?("INST HEALTH_STATUS TEMP1")).to be_truthy
327
327
  disable_limits("INST HEALTH_STATUS TEMP1")
328
- limits_enabled?("INST HEALTH_STATUS TEMP1").should be_falsey
328
+ expect(limits_enabled?("INST HEALTH_STATUS TEMP1")).to be_falsey
329
329
  enable_limits("INST HEALTH_STATUS TEMP1")
330
- limits_enabled?("INST HEALTH_STATUS TEMP1").should be_truthy
330
+ expect(limits_enabled?("INST HEALTH_STATUS TEMP1")).to be_truthy
331
331
  end
332
332
  end
333
333
 
334
334
  describe "get_limits, set_limits" do
335
- it "should get and set limits for an item" do
336
- get_limits("INST", "HEALTH_STATUS", "TEMP1").should eql [:DEFAULT, 1, true, -80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
337
- set_limits("INST", "HEALTH_STATUS", "TEMP1", 1, 2, 5, 6, 3, 4).should eql [:CUSTOM, 1, true, 1.0, 2.0, 5.0, 6.0, 3.0, 4.0]
335
+ it "gets and set limits for an item" do
336
+ expect(get_limits("INST", "HEALTH_STATUS", "TEMP1")).to eql [:DEFAULT, 1, true, -80.0, -70.0, 60.0, 80.0, -20.0, 20.0]
337
+ expect(set_limits("INST", "HEALTH_STATUS", "TEMP1", 1, 2, 5, 6, 3, 4)).to eql [:CUSTOM, 1, true, 1.0, 2.0, 5.0, 6.0, 3.0, 4.0]
338
338
  end
339
339
  end
340
340
 
341
341
  describe "get_limits_groups, enable_limits_group, disable_limits_group" do
342
- it "should enable, disable, and get groups" do
343
- get_limits_groups.should include("FIRST")
342
+ it "enables, disable, and get groups" do
343
+ expect(get_limits_groups).to include("FIRST")
344
344
  enable_limits_group("FIRST")
345
345
  disable_limits_group("FIRST")
346
346
  end
347
347
  end
348
348
 
349
349
  describe "get_limits_sets, enable_limits_set, disable_limits_set" do
350
- it "should enable, disable, and get sets CTS-16" do
350
+ it "enables, disable, and get sets CTS-16" do
351
351
  if get_limits_sets.include?(:CUSTOM)
352
- get_limits_sets.should eql [:DEFAULT,:TVAC,:CUSTOM]
352
+ expect(get_limits_sets).to eql [:DEFAULT,:TVAC,:CUSTOM]
353
353
  else
354
- get_limits_sets.should eql [:DEFAULT,:TVAC]
354
+ expect(get_limits_sets).to eql [:DEFAULT,:TVAC]
355
355
  end
356
356
  set_limits_set(:TVAC)
357
- get_limits_set.should eql :TVAC
357
+ expect(get_limits_set).to eql :TVAC
358
358
  set_limits_set(:DEFAULT)
359
- get_limits_set.should eql :DEFAULT
359
+ expect(get_limits_set).to eql :DEFAULT
360
360
  end
361
361
  end
362
362
 
363
363
  describe "get_target_list" do
364
- it "should return the list of targets" do
365
- get_target_list.should include("INST")
364
+ it "returns the list of targets" do
365
+ expect(get_target_list).to include("INST")
366
366
  end
367
367
  end
368
368
 
369
369
  describe "subscribe_limits_events, get_limits_event, unsubscribe_limits_events" do
370
- it "should raise an error if non_block and the queue is empty" do
370
+ it "raises an error if non_block and the queue is empty" do
371
371
  id = subscribe_limits_events
372
372
  expect { get_limits_event(id, true) }.to raise_error(ThreadError, "queue empty")
373
373
  unsubscribe_limits_events(id)
374
374
  end
375
375
 
376
- it "should subscribe and get limits change events" do
376
+ it "subscribes and get limits change events" do
377
377
  id = subscribe_limits_events
378
378
  CmdTlmServer.instance.post_limits_event(:LIMITS_CHANGE, ['TGT','PKT','ITEM',:YELLOW,:RED])
379
379
  result = get_limits_event(id, true)
380
- result[0].should eql :LIMITS_CHANGE
380
+ expect(result[0]).to eql :LIMITS_CHANGE
381
381
  unsubscribe_limits_events(id)
382
382
  end
383
383
 
384
- it "should subscribe and get limits settings events" do
384
+ it "subscribes and get limits settings events" do
385
385
  id = subscribe_limits_events
386
386
  CmdTlmServer.instance.post_limits_event(:LIMITS_SETTINGS, ['TGT','PKT','ITEM',:DEFAULT])
387
387
  result = get_limits_event(id, true)
388
- result[0].should eql :LIMITS_SETTINGS
388
+ expect(result[0]).to eql :LIMITS_SETTINGS
389
389
  unsubscribe_limits_events(id)
390
390
  end
391
391
 
392
- it "should handle unknown limits events" do
392
+ it "handles unknown limits events" do
393
393
  id = subscribe_limits_events
394
394
  CmdTlmServer.instance.post_limits_event(:UNKNOWN, "This is a test")
395
395
  result = get_limits_event(id, true)
396
- result[0].should eql :UNKNOWN
396
+ expect(result[0]).to eql :UNKNOWN
397
397
  unsubscribe_limits_events(id)
398
398
  end
399
399
  end
400
400
 
401
401
  describe "subscribe_packet_data, get_packet, unsubscribe_packet_data" do
402
- it "should raise an error if non_block and the queue is empty" do
402
+ it "raises an error if non_block and the queue is empty" do
403
403
  id = subscribe_packet_data([["INST","HEALTH_STATUS"]])
404
404
  expect { get_packet(id, true) }.to raise_error(ThreadError, "queue empty")
405
405
  unsubscribe_packet_data(id)
406
406
  end
407
407
 
408
- it "should subscribe and get limits events" do
408
+ it "subscribes and get limits events" do
409
409
  id = subscribe_packet_data([["INST","HEALTH_STATUS"]])
410
410
  CmdTlmServer.instance.post_packet(System.telemetry.packet("INST","HEALTH_STATUS"))
411
411
  packet = get_packet(id, true)
412
- packet.target_name.should eql "INST"
413
- packet.packet_name.should eql "HEALTH_STATUS"
412
+ expect(packet.target_name).to eql "INST"
413
+ expect(packet.packet_name).to eql "HEALTH_STATUS"
414
414
  unsubscribe_packet_data(id)
415
415
  end
416
416
  end
417
417
 
418
418
  describe "play_wav_file" do
419
- it "should play a wav file if Qt is available" do
419
+ it "plays a wav file if Qt is available" do
420
420
  module Qt
421
421
  def self.execute_in_main_thread(bool); yield; end
422
422
  class CoreApplication; def self.instance; true; end; end;
@@ -428,7 +428,7 @@ module Cosmos
428
428
  end
429
429
 
430
430
  describe "status_bar" do
431
- it "should set the ScriptRunner status bar" do
431
+ it "sets the ScriptRunner status bar" do
432
432
  class ScriptRunner; end
433
433
  sc = ScriptRunner.new
434
434
  expect(sc).to receive(:script_set_status).with("HI")
@@ -437,56 +437,56 @@ module Cosmos
437
437
  end
438
438
 
439
439
  describe "ask_string, ask" do
440
- it "should get user input" do
440
+ it "gets user input" do
441
441
  $stdout = StringIO.new
442
442
  expect(self).to receive(:gets) { '10' }
443
- ask_string("").should eql '10'
443
+ expect(ask_string("")).to eql '10'
444
444
  expect(self).to receive(:gets) { '10' }
445
- ask("").should eql 10
445
+ expect(ask("")).to eql 10
446
446
  $stdout = STDOUT
447
447
  end
448
448
  end
449
449
 
450
450
  describe "prompt, prompt_message_box" do
451
- it "should prompt the user for input" do
451
+ it "prompts the user for input" do
452
452
  $stdout = StringIO.new
453
453
  expect(self).to receive(:gets) { 'message' }
454
- prompt("").should eql 'message'
454
+ expect(prompt("")).to eql 'message'
455
455
  expect(self).to receive(:gets) { 'b1' }
456
- message_box("",["b1","b2"]).should eql 'b1'
456
+ expect(message_box("",["b1","b2"])).to eql 'b1'
457
457
  $stdout = STDOUT
458
458
  end
459
459
  end
460
460
 
461
461
  describe "check, check_formatted, check_with_units, check_raw" do
462
- it "should check a telemetry item vs a condition" do
462
+ it "checks a telemetry item vs a condition" do
463
463
  capture_io do |stdout|
464
464
  check("INST HEALTH_STATUS TEMP1 == -100")
465
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == -100 success"
465
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == -100 success"
466
466
  stdout.rewind
467
467
 
468
468
  check("INST","HEALTH_STATUS","TEMP1","== -100")
469
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == -100 success"
469
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == -100 success"
470
470
  stdout.rewind
471
471
 
472
472
  check_formatted("INST HEALTH_STATUS TEMP1 == '-100.000'")
473
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == '-100.000' success"
473
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == '-100.000' success"
474
474
  stdout.rewind
475
475
 
476
476
  check_formatted("INST","HEALTH_STATUS","TEMP1","== '-100.000'")
477
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == '-100.000' success"
477
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == '-100.000' success"
478
478
  stdout.rewind
479
479
 
480
480
  check_with_units("INST HEALTH_STATUS TEMP1 == '-100.000 C'")
481
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == '-100.000 C' success"
481
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == '-100.000 C' success"
482
482
  stdout.rewind
483
483
 
484
484
  check_with_units("INST","HEALTH_STATUS","TEMP1","== '-100.000 C'")
485
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == '-100.000 C' success"
485
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == '-100.000 C' success"
486
486
  stdout.rewind
487
487
 
488
488
  check_raw("INST HEALTH_STATUS TEMP1")
489
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == 0"
489
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == 0"
490
490
  end
491
491
 
492
492
  check("INST HEALTH_STATUS TEMP1 < 0")
@@ -495,17 +495,17 @@ module Cosmos
495
495
  end
496
496
 
497
497
  describe "check_tolerance, check_tolerance_raw" do
498
- it "should check a telemetry item vs tolerance" do
498
+ it "checks a telemetry item vs tolerance" do
499
499
  capture_io do |stdout|
500
500
  check_tolerance("INST HEALTH_STATUS TEMP1", -100.0, 1)
501
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 was within range"
501
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 was within range"
502
502
  stdout.rewind
503
503
 
504
504
  expect { check_tolerance("INST HEALTH_STATUS TEMP1", -200.0, 1) }.to raise_error(CheckError, /CHECK: INST HEALTH_STATUS TEMP1 failed to be within range/)
505
505
  stdout.rewind
506
506
 
507
507
  check_tolerance_raw("INST HEALTH_STATUS TEMP1", 0, 1)
508
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 was within range"
508
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 was within range"
509
509
  stdout.rewind
510
510
 
511
511
  expect { check_tolerance_raw("INST HEALTH_STATUS TEMP1", 100, 1) }.to raise_error(CheckError, /CHECK: INST HEALTH_STATUS TEMP1 failed to be within range/)
@@ -515,10 +515,10 @@ module Cosmos
515
515
  end
516
516
 
517
517
  describe "check_expression" do
518
- it "should check an arbitrary expression" do
518
+ it "checks an arbitrary expression" do
519
519
  capture_io do |stdout|
520
520
  check_expression("true == true")
521
- stdout.string.should match "CHECK: true == true is TRUE"
521
+ expect(stdout.string).to match "CHECK: true == true is TRUE"
522
522
  end
523
523
 
524
524
  expect { check_expression("true == false") }.to raise_error(CheckError, "CHECK: true == false is FALSE")
@@ -526,70 +526,70 @@ module Cosmos
526
526
  end
527
527
 
528
528
  describe "wait, wait_raw, wait_tolerance, wait_tolerance_raw" do
529
- it "should wait for telemetry check to be true" do
529
+ it "waits for telemetry check to be true" do
530
530
  capture_io do |stdout|
531
531
  # Success
532
532
  wait("INST HEALTH_STATUS TEMP1 == -100.0", 5)
533
- stdout.string.should match "WAIT: INST HEALTH_STATUS TEMP1 == -100.0"
533
+ expect(stdout.string).to match "WAIT: INST HEALTH_STATUS TEMP1 == -100.0"
534
534
  stdout.rewind
535
535
  wait_raw("INST HEALTH_STATUS TEMP1 == 0", 5)
536
- stdout.string.should match "WAIT: INST HEALTH_STATUS TEMP1 == 0"
536
+ expect(stdout.string).to match "WAIT: INST HEALTH_STATUS TEMP1 == 0"
537
537
  stdout.rewind
538
538
  wait_tolerance("INST HEALTH_STATUS TEMP1", -100.0, 1, 5)
539
- stdout.string.should match "WAIT: INST HEALTH_STATUS TEMP1 was within"
539
+ expect(stdout.string).to match "WAIT: INST HEALTH_STATUS TEMP1 was within"
540
540
  stdout.rewind
541
541
  wait_tolerance_raw("INST HEALTH_STATUS TEMP1", 0, 1, 5)
542
- stdout.string.should match "WAIT: INST HEALTH_STATUS TEMP1 was within"
542
+ expect(stdout.string).to match "WAIT: INST HEALTH_STATUS TEMP1 was within"
543
543
  stdout.rewind
544
544
 
545
545
  # Failure
546
546
  wait("INST HEALTH_STATUS TEMP1 == -200.0", 0.1)
547
- stdout.string.should match "WAIT: INST HEALTH_STATUS TEMP1 == -200.0 failed"
547
+ expect(stdout.string).to match "WAIT: INST HEALTH_STATUS TEMP1 == -200.0 failed"
548
548
  stdout.rewind
549
549
  wait_raw("INST HEALTH_STATUS TEMP1 == 100", 0.1)
550
- stdout.string.should match "WAIT: INST HEALTH_STATUS TEMP1 == 100 failed"
550
+ expect(stdout.string).to match "WAIT: INST HEALTH_STATUS TEMP1 == 100 failed"
551
551
  stdout.rewind
552
552
  wait_tolerance("INST HEALTH_STATUS TEMP1", -200.0, 1, 0.1)
553
- stdout.string.should match "WAIT: INST HEALTH_STATUS TEMP1 failed to be within"
553
+ expect(stdout.string).to match "WAIT: INST HEALTH_STATUS TEMP1 failed to be within"
554
554
  stdout.rewind
555
555
  wait_tolerance_raw("INST HEALTH_STATUS TEMP1", 100, 1, 0.1)
556
- stdout.string.should match "WAIT: INST HEALTH_STATUS TEMP1 failed to be within"
556
+ expect(stdout.string).to match "WAIT: INST HEALTH_STATUS TEMP1 failed to be within"
557
557
  stdout.rewind
558
558
  end
559
559
  end
560
560
  end
561
561
 
562
562
  describe "wait_expression" do
563
- it "should wait for an expression to be true" do
563
+ it "waits for an expression to be true" do
564
564
  capture_io do |stdout|
565
565
  # Success
566
566
  wait_expression("true == true", 5)
567
- stdout.string.should match "WAIT: true == true is TRUE"
567
+ expect(stdout.string).to match "WAIT: true == true is TRUE"
568
568
  stdout.rewind
569
569
 
570
570
  # Failure
571
571
  wait_expression("true == false", 0.1)
572
- stdout.string.should match "WAIT: true == false is FALSE"
572
+ expect(stdout.string).to match "WAIT: true == false is FALSE"
573
573
  stdout.rewind
574
574
  end
575
575
  end
576
576
  end
577
577
 
578
578
  describe "wait_check, wait_check_raw, wait_check_tolerance, wait_check_tolerance_raw" do
579
- it "should wait for telemetry check to be true" do
579
+ it "waits for telemetry check to be true" do
580
580
  capture_io do |stdout|
581
581
  # Success
582
582
  wait_check("INST HEALTH_STATUS TEMP1 == -100.0", 5)
583
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == -100.0"
583
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == -100.0"
584
584
  stdout.rewind
585
585
  wait_check_raw("INST HEALTH_STATUS TEMP1 == 0", 5)
586
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 == 0"
586
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 == 0"
587
587
  stdout.rewind
588
588
  wait_check_tolerance("INST HEALTH_STATUS TEMP1", -100.0, 1, 5)
589
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 was within"
589
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 was within"
590
590
  stdout.rewind
591
591
  wait_check_tolerance_raw("INST HEALTH_STATUS TEMP1", 0, 1, 5)
592
- stdout.string.should match "CHECK: INST HEALTH_STATUS TEMP1 was within"
592
+ expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 was within"
593
593
  stdout.rewind
594
594
  end
595
595
 
@@ -604,11 +604,11 @@ module Cosmos
604
604
  end
605
605
 
606
606
  describe "wait_check_expression" do
607
- it "should wait for an expression to be true" do
607
+ it "waits for an expression to be true" do
608
608
  capture_io do |stdout|
609
609
  # Success
610
610
  wait_check_expression("true == true", 5)
611
- stdout.string.should match "CHECK: true == true is TRUE"
611
+ expect(stdout.string).to match "CHECK: true == true is TRUE"
612
612
  stdout.rewind
613
613
  end
614
614
 
@@ -618,7 +618,7 @@ module Cosmos
618
618
  end
619
619
 
620
620
  describe "wait_packet, wait_check_packet" do
621
- it "should wait for a certain number of packets" do
621
+ it "waits for a certain number of packets" do
622
622
  capture_io do |stdout|
623
623
  wait_packet("INST","HEALTH_STATUS",1,0.1)
624
624
  end
@@ -628,36 +628,36 @@ module Cosmos
628
628
  end
629
629
 
630
630
  describe "get_interface_names" do
631
- it "should return all interfaces" do
632
- get_interface_names.should include("INST_INT")
631
+ it "returns all interfaces" do
632
+ expect(get_interface_names).to include("INST_INT")
633
633
  end
634
634
  end
635
635
 
636
636
  describe "connect_interface, disconnect_interface, interface_state" do
637
- it "should connect, disconnect and return the state of the interface CTS-3" do
637
+ it "connects, disconnect and return the state of the interface CTS-3" do
638
638
  connect_interface("INST_INT")
639
- interface_state("INST_INT").should eql "CONNECTED"
639
+ expect(interface_state("INST_INT")).to eql "CONNECTED"
640
640
  disconnect_interface("INST_INT")
641
641
  end
642
642
  end
643
643
 
644
644
  describe "map_target_to_interface" do
645
- it "should map a target name to an interface" do
645
+ it "maps a target name to an interface" do
646
646
  map_target_to_interface("INST","INST_INT")
647
647
  end
648
648
  end
649
649
 
650
650
  describe "connect_router, disconnect_router, get_router_names, router_state" do
651
- it "should return connect, disconnect, and list the routers CTS-11" do
652
- get_router_names.should include("PREIDENTIFIED_ROUTER")
651
+ it "returns connect, disconnect, and list the routers CTS-11" do
652
+ expect(get_router_names).to include("PREIDENTIFIED_ROUTER")
653
653
  connect_router("PREIDENTIFIED_ROUTER")
654
- router_state("PREIDENTIFIED_ROUTER").should eql "CONNECTED"
654
+ expect(router_state("PREIDENTIFIED_ROUTER")).to eql "CONNECTED"
655
655
  disconnect_router("PREIDENTIFIED_ROUTER")
656
656
  end
657
657
  end
658
658
 
659
659
  describe "logging methods" do
660
- it "should start and stop logging and get filenames CTS-14" do
660
+ it "starts and stop logging and get filenames CTS-14" do
661
661
  start_logging
662
662
  stop_logging
663
663
  get_cmd_log_filename
@@ -678,23 +678,23 @@ module Cosmos
678
678
  start_new_server_message_log
679
679
  sleep 0.1
680
680
  filename = get_server_message_log_filename
681
- filename.should match /server_messages.txt/
681
+ expect(filename).to match /server_messages.txt/
682
682
  end
683
683
  end
684
684
 
685
685
  describe "display" do
686
- it "should display a telemetry viewer screen" do
686
+ it "displays a telemetry viewer screen" do
687
687
  expect { display("HI") }.to raise_error(RuntimeError, /HI could not be displayed/)
688
688
  end
689
689
  end
690
690
  describe "clear" do
691
- it "should close a telemetry viewer screen" do
691
+ it "closes a telemetry viewer screen" do
692
692
  expect { clear("HI") }.to raise_error(RuntimeError, /HI could not be cleared/)
693
693
  end
694
694
  end
695
695
 
696
696
  describe "ScriptRunnerFrame methods" do
697
- it "should call various ScriptRunnerFrame methods" do
697
+ it "calls various ScriptRunnerFrame methods" do
698
698
  class Dummy; def method_missing(meth, *args, &block); end; end
699
699
  class ScriptRunnerFrame
700
700
  def self.method_missing(meth, *args, &block); end
@@ -712,22 +712,22 @@ module Cosmos
712
712
  end
713
713
 
714
714
  describe "start" do
715
- it "should start a script locally" do
715
+ it "starts a script locally" do
716
716
  class ScriptRunnerFrame; def self.instance; false; end; end
717
717
  start("cosmos.rb")
718
718
  end
719
719
 
720
- it "should start a script without the .rb extension" do
720
+ it "starts a script without the .rb extension" do
721
721
  class ScriptRunnerFrame; def self.instance; false; end; end
722
722
  start("cosmos")
723
723
  end
724
724
 
725
- it "should raise an error if the script can't be found" do
725
+ it "raises an error if the script can't be found" do
726
726
  class ScriptRunnerFrame; def self.instance; false; end; end
727
727
  expect { start("unknown_script.rb") }.to raise_error(RuntimeError)
728
728
  end
729
729
 
730
- it "should start a script within ScriptRunnerFrame" do
730
+ it "starts a script within ScriptRunnerFrame" do
731
731
  class ScriptRunnerFrame
732
732
  @@instrumented_cache = {}
733
733
  def self.instance; true; end