spec/advisory_spec.rb in mrjoy-bundler-audit-0.3.3 vs spec/advisory_spec.rb in mrjoy-bundler-audit-0.3.4
- old
+ new
@@ -1,13 +1,18 @@
require 'spec_helper'
require 'bundler/audit/database'
require 'bundler/audit/advisory'
-describe Bundler::Audit::Advisory do
- let(:root) { Bundler::Audit::Database::VENDORED_PATH }
+describe Advisory do
+ before(:suite) do
+ Database.update!
+ end
+
+ let(:root) { "spec/fixtures" }
let(:gem) { 'actionpack' }
let(:id) { 'OSVDB-84243' }
- let(:path) { File.join(root,'gems',gem,"#{id}.yml") }
+ let(:path) { File.join(root,"#{id}.yml") }
+
let(:an_unaffected_version) do
Bundler::Audit::Advisory.load(path).unaffected_versions.map { |version_rule|
# For all the rules, get the individual constraints out and see if we
# can find a suitable one...
version_rule.requirements.select { |(constraint, gem_version)|