lib/bunny_mock/session.rb in bunny-mock-1.2.1 vs lib/bunny_mock/session.rb in bunny-mock-1.2.2

- old
+ new

@@ -49,11 +49,10 @@ # Sets status to closed # # @return [BunnyMock::Session] self # @api public def stop - @status = :closed self end alias close stop @@ -62,11 +61,29 @@ # Tests if connection is available # # @return [Boolean] true if status is connected, false otherwise # @api public def open? - @status == :connected + end + alias connected? open? + + ## + # Tests if connection is closed + # + # @return [Boolean] true if status is closed, false otherwise + # @api public + def closed? + @status == :closed + end + + ## + # Tests if connection is closing + # + # @return [Boolean] true if status is closing, false otherwise + # @api public + def closing? + @status == :closing end ## # Creates a new {BunnyMock::Channel} instance #