spec/service_spec.rb in ruby-nmap-0.7.0 vs spec/service_spec.rb in ruby-nmap-0.8.0

- old
+ new

@@ -7,70 +7,70 @@ describe Service do subject { @xml.hosts.first.ports.first.service } describe "#name" do it "should parse the name" do - subject.name.should == 'ssh' + expect(subject.name).to eq('ssh') end end describe "#ssl?" do it "should check the tunnel attribute" do - pending "need a service that uses SSL" + skip "need a service that uses SSL" end end describe "#protocol" do it "should parse the proto attribute" do - pending "need a service with the proto attribute" + skip "need a service with the proto attribute" end end describe "#product" do it "should parse the product name attribute" do - subject.product.should == 'OpenSSH' + expect(subject.product).to eq('OpenSSH') end end describe "#version" do it "should parse the version attribute" do - subject.version.should == '5.3p1 Debian 3ubuntu7' + expect(subject.version).to eq('5.3p1 Debian 3ubuntu7') end end describe "#extra_info" do it "should parse the extrainfo attribute" do - subject.extra_info.should == 'protocol 2.0' + expect(subject.extra_info).to eq('protocol 2.0') end end describe "#hostname" do it "should parse the hostname attribute" do - pending "need a service with the hostname attribute" + skip "need a service with the hostname attribute" end end describe "#os_type" do it "should parse the ostype attribute" do - subject.os_type.should == 'Linux' + expect(subject.os_type).to eq('Linux') end end describe "#device_type" do it "should parse the devicetype attribute" do - pending "need a service with the devicetype attribute" + skip "need a service with the devicetype attribute" end end describe "#fingerprint_method" do it "should parse the method attribute" do - subject.fingerprint_method.should == :probed + expect(subject.fingerprint_method).to eq(:probed) end end describe "#confidence" do it "should parse the conf attribute" do - subject.confidence.should be_between(0,10) + expect(subject.confidence).to be_between(0,10) end end it_should_behave_like "CPE" end