Sha256: 1be7da1484ae5b7d8cc3a592b3dc7412387e6583b8a744201252ac835dee3b0f

Contents?: true

Size: 995 Bytes

Versions: 1

Compression:

Stored size: 995 Bytes

Contents

shared_examples 'App::Views::InterestingFiles' do

  let(:controller)       { CMSScanner::Controller::InterestingFiles.new }
  let(:tpl_vars)         { { url: target_url } }
  let(:interesting_file) { CMSScanner::InterestingFile }

  describe 'findings' do
    let(:view) { 'findings' }
    let(:opts) { { confidence: 10, found_by: 'Spec' } }

    it 'outputs the expected string' do
      findings = CMSScanner::Finders::Findings.new <<
        interesting_file.new('F1', opts) <<
        interesting_file.new('F2', opts.merge(references: %w(R1), interesting_entries: %w(IE1))) <<
        interesting_file.new('F2', opts.merge(found_by: 'Spec2')) <<
        interesting_file.new('F3',
                             opts.merge(references: %w(R1 R2), interesting_entries: %w(IE1 IE2))) <<
        interesting_file.new('F3', opts.merge(found_by: 'Spec2')) <<
        interesting_file.new('F3', opts.merge(found_by: 'Spec3'))

      @tpl_vars = tpl_vars.merge(findings: findings)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cms_scanner-0.0.5 spec/shared_examples/views/interesting_files.rb