Sha256: f2ab797b9d52c998eb2074827a8232099e83d91da15a4a820691890d38534555

Contents?: true

Size: 811 Bytes

Versions: 5

Compression:

Stored size: 811 Bytes

Contents

shared_examples CMSScanner::Finders::IndependentFinder do

  describe '::find' do
    it 'creates a new object and call finders#find' do
      created = described_class.new(target)

      expect(described_class).to receive(:new).and_return(created)
      expect(created).to receive(:find)

      described_class.find(target)
    end
  end

  describe '#find' do
    it 'calls finders#run' do
      expect(subject.finders).to receive(:run).with({})
      subject.find
    end
  end

  describe '#finders' do
    its(:finders) { should be_a CMSScanner::Finders::IndependentFinders }

    it 'returns the correct finders' do
      finders = subject.finders

      expect(finders.size).to eq expected_finders.size
      expect(finders.map { |f| f.class.to_s.demodulize }).to eq expected_finders
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cms_scanner-0.0.6 spec/shared_examples/independent_finder.rb
cms_scanner-0.0.5 spec/shared_examples/independent_finder.rb
cms_scanner-0.0.4 spec/shared_examples/independent_finder.rb
cms_scanner-0.0.3 spec/shared_examples/independent_finder.rb
cms_scanner-0.0.2 spec/shared_examples/independent_finder.rb