Skip to content

Commit

Permalink
Quarantine Ping spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ford committed May 6, 2010
1 parent f976513 commit 437efdd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions spec/ruby/library/ping/pingecho_spec.rb
@@ -1,15 +1,9 @@
require File.expand_path('../../../spec_helper', __FILE__)

ruby_version_is ""..."1.9" do

require 'ping'

describe "Ping.pingecho" do

it "responds to pingecho method" do
Ping.should respond_to(:pingecho)
end

it "pings a host using the correct number of arguments" do
Ping.pingecho('127.0.0.1', 10, 7).should be_true
Ping.pingecho('127.0.0.1', 10).should be_true
Expand All @@ -24,8 +18,12 @@
Ping.pingecho('127.0.0.1', 'invalid timeout').should be_false
end

it "returns false if the host is invalid" do
Ping.pingecho(0).should be_false
# Is it ever possible to spec invalid hosts? I think the consensus
# is building towards "no".
quarantine! do
it "returns false if the host is invalid" do
Ping.pingecho(0).should be_false
end
end
end
end

0 comments on commit 437efdd

Please sign in to comment.