Sha256: e907848e9282c1396a00acd00d6308d6120e2bc7e40097b2c51b8dafe63fd866
Contents?: true
Size: 886 Bytes
Versions: 1
Compression:
Stored size: 886 Bytes
Contents
require 'spec_helper' require 'gobuster/parsers/fuzz' describe Gobuster::Parsers::Fuzz do describe ".parse" do let(:url) { '/test' } let(:status) { 200 } let(:size) { 176368 } let(:line) { "Found: [Status=#{status}] [Length=#{size}] #{url}" } let(:io) { StringIO.new(line + $/) } it "must parse each line and yield Gobuster::Response objects" do yielded_responses = [] subject.parse(io) do |response| yielded_responses << response end expect(yielded_responses.length).to eq(1) expect(yielded_responses.first).to be_kind_of(Gobuster::Response) yielded_response = yielded_responses.first expect(yielded_response.url).to eq(url) expect(yielded_response.path).to be(nil) expect(yielded_response.status).to eq(status) expect(yielded_response.size).to eq(size) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-gobuster-0.1.0 | spec/parsers/fuzz_spec.rb |