Skip to content

Commit

Permalink
Fixed Ping specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ford committed May 6, 2010
1 parent 92c6a15 commit 448642d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/ruby/library/ping/pingecho_spec.rb
Expand Up @@ -16,16 +16,16 @@
Ping.pingecho('127.0.0.1').should be_true
end

it "raises ArgumentError for wrong number of arguments" do
lambda { Ping.pingecho }.should raise_error(ArgumentError)
lambda { Ping.pingecho 'one', 'two', 'three', 'four' }.should raise_error(ArgumentError)
it "returns false if the port is invalid" do
Ping.pingecho('127.0.0.1', 5, 'invalid port').should be_false
end

it "returns false for invalid parameters" do
Ping.pingecho('127.0.0.1', 5, 'invalid port').should be_false
it "returns false if the timeout value is invalid" do
Ping.pingecho('127.0.0.1', 'invalid timeout').should be_false
Ping.pingecho(123).should be_false
end

it "returns false if the host is invalid" do
Ping.pingecho(0).should be_false
end
end
end

0 comments on commit 448642d

Please sign in to comment.