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

- old
+ new

@@ -5,27 +5,37 @@ require 'cgi' describe OS do subject { @xml.hosts.first.os.classes.first } - it "should parse the type" do - subject.type.should == :"general purpose" + describe "#type" do + it "should parse the type" do + expect(subject.type).to eq(:"general purpose") + end end - it "should parse the vendor" do - subject.vendor.should == 'Linux' + describe "#vendor" do + it "should parse the vendor" do + expect(subject.vendor).to eq('Linux') + end end - it "should parse the family" do - subject.family.should == :Linux + describe "#family" do + it "should parse the family" do + expect(subject.family).to eq(:Linux) + end end - it "should parse the gen" do - subject.gen.should == :'2.6.X' + describe "#gen" do + it "should parse the gen" do + expect(subject.gen).to eq(:'2.6.X') + end end - it "should parse the accuracy" do - subject.accuracy.should be_between(0,100) + describe "#accuracy" do + it "should parse the accuracy" do + expect(subject.accuracy).to be_between(0,100) + end end it_should_behave_like "CPE" end