Use ENV to control the port used, did the minimum to get the tests
running, thinking we can support reading more parts of the URI from ENV
later.
There was a bug in the statement that assigned the port instance
variable, || has higher precedence than the ternary operator so Ruby
interpreted the old code as
(@uri.port || @tls) ? 5671 : 5672
which worked as expected as long as both variables where nil.
Use ENV to control the port used, did the minimum to get the tests running, thinking we can support reading more parts of the URI from ENV later.
There was a bug in the statement that assigned the port instance variable, || has higher precedence than the ternary operator so Ruby interpreted the old code as
which worked as expected as long as both variables where nil.