File: issue202_spec.rb

package info (click to toggle)
ruby-bunny 2.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,644 kB
  • sloc: ruby: 10,256; sh: 70; makefile: 8
file content (15 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require "spec_helper"

describe Bunny::Session do
  context "with unreachable host" do
    it "raises Bunny::TCPConnectionFailed" do
      begin
        conn = Bunny.new(:hostname => "127.0.0.254", :port => 1433)
        conn.start

        fail "expected 192.192.192.192 to be unreachable"
      rescue Bunny::TCPConnectionFailed => e
      end
    end
  end
end