Sha256: c68aeb6f2777327ce17ac32a0ba089247d344191eb5b9622673da1a4782c33e9

Contents?: true

Size: 813 Bytes

Versions: 5

Compression:

Stored size: 813 Bytes

Contents

require "minitest/autorun"
require "entree"

describe Entree::Audit do
  describe "Initialization" do
    it "requires a target to audit" do
      Entree::Audit.new("http://example.com").must_be_instance_of Entree::Audit
    end
  end

  describe '#run' do
    it 'return a parsed set of results' do
      skip
      # target = double
      # output = JSON.generate([{status: 'passing', foo: 'bar'}])

      # audit = Entree::Audit.new(target)
      # audit.stub(:runner) { double(:runner, output: output, run: double) }

      # expect(audit.run).to eq "passing"=>[{"status"=>"passing", "foo"=>"bar"}]
    end
  end

  describe "#runner" do
    it "returns an Entree::Runner object" do
      audit = Entree::Audit.new("http://example.com")
      audit.runner.must_be_instance_of Entree::Runner
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
entree-0.0.5 test/entree/audit_test.rb
entree-0.0.4 test/entree/audit_test.rb
entree-0.0.3 test/entree/audit_test.rb
entree-0.0.2 test/entree/audit_test.rb
entree-0.0.1 test/entree/audit_test.rb