We have custom `RSpec::Matchers` for flow control exceptions. There's no need to manually expect to receive these functions. Additionally, we use these matchers in our codebase as a single line in general. There's no need to extend them to 3 lines unless it's too long. This cleanup has revealed some issues that need fixing: - learn_network_spec.rb: Our default stack value is `[{}]`. `[]` is not expected, and fails our code when popped. - rekey_nic_tunnel.rb: `pop` raises an exception, so the code can't run after it. `return` is unnecessary. - base.rb: Our default stack value is `[{}]`, so `frame&` is unnecessary. We don't need to write extra test to cover this branch. It was covered previously because of the wrong stack value at `learn_network_spec.rb`.
2.0 KiB
2.0 KiB