Sha256: caa3e1b1c5b701e72e602bcf94997723ae785de23f151270a7876b424d258042
Contents?: true
Size: 923 Bytes
Versions: 26
Compression:
Stored size: 923 Bytes
Contents
require 'spec_helper' describe LitmusPaper::Dependency::TCP do before(:all) do @server = TCPServer.new 3333 end after(:all) do @server.close end describe "#available?" do it "is true when it's able to reach the ip and port" do check = LitmusPaper::Dependency::TCP.new("127.0.0.1", 3333) check.should be_available end it "is false when the ip is not available" do check = LitmusPaper::Dependency::TCP.new("10.254.254.254", 3333) check.should_not be_available end it "is false when the port is not available" do check = LitmusPaper::Dependency::TCP.new("127.0.0.1", 3334) check.should_not be_available end end describe "to_s" do it "is the name of the class and the ip and port" do check = LitmusPaper::Dependency::TCP.new("127.0.0.1", 3333) check.to_s.should == "Dependency::TCP(tcp://127.0.0.1:3333)" end end end
Version data entries
26 entries across 26 versions & 1 rubygems