Sha256: e6f2433c2086e3f6c245bb3185bf961a94fd375b13b446974982181ffe2b259c

Contents?: true

Size: 996 Bytes

Versions: 8

Compression:

Stored size: 996 Bytes

Contents

shared_examples CMSScanner::Finders::Finding do
  [:references, :confirmed_by, :interesting_entries].each do |opt|
    describe "##{opt}" do
      its(opt) { should eq [] }

      context 'when supplied in the #new' do
        let(:opts) { { opt => 'test' } }

        its(opt) { should eq 'test' }
      end
    end
  end

  describe '#confidence, #confidence=' do
    its(:confidence) { should eql 0 }

    context 'when already set' do
      before { subject.confidence = 10 }

      its(:confidence) { should eql 10 }
    end
  end

  describe '#parse_finding_options' do
    xit
  end

  describe '#eql?' do
    before do
      subject.confidence = 10
      subject.found_by = 'test'
    end

    context 'when eql' do
      it 'returns true' do
        expect(subject).to eql subject
      end
    end

    context 'when not eql' do
      it 'returns false' do
        other = subject.dup
        other.confidence = 20

        expect(subject).to_not eql other
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cms_scanner-0.0.16 spec/shared_examples/finding.rb
cms_scanner-0.0.15 spec/shared_examples/finding.rb
cms_scanner-0.0.14 spec/shared_examples/finding.rb
cms_scanner-0.0.13 spec/shared_examples/finding.rb
cms_scanner-0.0.12 spec/shared_examples/finding.rb
cms_scanner-0.0.11 spec/shared_examples/finding.rb
cms_scanner-0.0.10 spec/shared_examples/finding.rb
cms_scanner-0.0.9 spec/shared_examples/finding.rb