Sha256: a3ade1dfada194fdff53eda017ff603ec8c8ef57ba645b6614b2bc2d4a7a8047
Contents?: true
Size: 930 Bytes
Versions: 5
Compression:
Stored size: 930 Bytes
Contents
require 'spec_helper' describe "The security check for gem unsafe dependency should" do before(:all) do @check = YAML.load_file("./spec/lib/kb/dependency_check.yml") @check.debug=true puts @check.vulnerable_version_array end it "fires if vulnerable 0.5.0 version is detected" do @check.dependencies = [{:name=>"acme-gem", :version=>'0.5.0'}] expect(@check.vuln?).to eq(true) end it "fires if vulnerable 1.3.2 version is found" do @check.dependencies = [{:name=>"acme-gem", :version=>'1.3.2'}] expect(@check.vuln?).to eq(true) end it "fires if vulnerable 3.4.0 version is found" do @check.dependencies = [{:name=>"acme-gem", :version=>'3.4.0'}] expect(@check.vuln?).to eq(true) end it "doesn't fire if not vulnerable 3.0.0 version is found" do @check.dependencies = [{:name=>"acme-gem", :version=>'3.0.0'}] expect(@check.vuln?).to eq(false) end end
Version data entries
5 entries across 5 versions & 1 rubygems