Sha256: 2553bef9f9a2a77f349922b66af381afab7d1eae4431091b923051d19ab68236

Contents?: true

Size: 369 Bytes

Versions: 12

Compression:

Stored size: 369 Bytes

Contents

RSpec::Matchers.define :be_reachable  do
  match do |host|
    proto   = 'tcp'
    timeout = 5
    if @attr
      port    = @attr[:port]
      proto   = @attr[:proto]   if @attr[:proto]
      timeout = @attr[:timeout] if @attr[:timeout]
    end

    backend.check_reachable(example, host, port, proto, timeout)
  end

  chain :with do |attr|
    @attr = attr
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
serverspec-0.4.2 lib/serverspec/matchers/be_reachable.rb
serverspec-0.4.1 lib/serverspec/matchers/be_reachable.rb
serverspec-0.4.0 lib/serverspec/matchers/be_reachable.rb
serverspec-0.3.2 lib/serverspec/matchers/be_reachable.rb
serverspec-0.3.1 lib/serverspec/matchers/be_reachable.rb
serverspec-0.3.0 lib/serverspec/matchers/be_reachable.rb
serverspec-0.2.28 lib/serverspec/matchers/be_reachable.rb
serverspec-0.2.27 lib/serverspec/matchers/be_reachable.rb
serverspec-0.2.26 lib/serverspec/matchers/be_reachable.rb
serverspec-0.2.25 lib/serverspec/matchers/be_reachable.rb
serverspec-0.2.24 lib/serverspec/matchers/be_reachable.rb
serverspec-0.2.23 lib/serverspec/matchers/be_reachable.rb