Sha256: bf47bed25a778b2fc5d1ee4e644779be0828fcd37ea675048dcb6a8fe97e72a4
Contents?: true
Size: 872 Bytes
Versions: 5
Compression:
Stored size: 872 Bytes
Contents
require 'spec_helper' describe CMSScanner::FantasticoFileslist do subject(:file) { described_class.new(url) } let(:url) { 'http://example.com/robots.txt' } let(:fixtures) { File.join(FIXTURES, 'interesting_files', 'fantastico_fileslist') } describe '#interesting_entries' do let(:headers) { { 'Content-Type' => 'text/plain; charset=utf-8' } } after do body = File.new(File.join(fixtures, fixture)).read stub_request(:get, file.url).to_return(headers: headers, body: body) expect(file.interesting_entries).to eq @expected end context 'when empty or / entries' do let(:fixture) { 'fantastico_fileslist.txt' } it 'ignores them and only returns the others' do @expected = %w(data.sql admin.txt) end end end describe '#references' do its(:references) { should_not be_nil } end end
Version data entries
5 entries across 5 versions & 1 rubygems