Sha256: e5f4640db8c6e3833e3043f22ae5863d4effb05392178413da94d6bfed6149ba

Contents?: true

Size: 918 Bytes

Versions: 1

Compression:

Stored size: 918 Bytes

Contents

require 'spec_helper'

describe VulnDBHQ do

  describe '.respond_to?' do
    it "delegates to VulnDBHQ::Client" do
      VulnDBHQ.respond_to?(:private_pages).should be_true
    end
    it "takes an optional argument" do
      VulnDBHQ.respond_to?(:private_pages, true).should be_true
    end
  end

  describe ".client" do
    it "returns a VulnDBHQ::Client" do
      VulnDBHQ.client.should be_a VulnDBHQ::Client
    end
  end

  describe ".configure" do
    VulnDBHQ::Configurable.keys.each do |key|
      it "sets the #{key.to_s.gsub('_', ' ')}" do
        VulnDBHQ.configure do |config|
          config.send("#{key}=", key)
        end
        VulnDBHQ.instance_variable_get("@#{key}").should eq key
      end
    end
  end

  VulnDBHQ::Configurable::CONFIG_KEYS.each do |key|
    it "has a default #{key.to_s.gsub('_', ' ')}" do
      VulnDBHQ.send(key).should eq VulnDBHQ::Default.options[key]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vulndbhq-0.0.1.beta spec/vulndbhq_spec.rb