Sha256: a18c562d44d22ae7414beb4c2b33e9f8d15618a7d53a255e1912aefbe9f4f741

Contents?: true

Size: 887 Bytes

Versions: 3

Compression:

Stored size: 887 Bytes

Contents

require 'spec_helper'

describe Arachni::Element::Capabilities::WithScope::Scope do

    before :each do
        Arachni::Options.reset
    end

    subject { Arachni::Element::Base.new( url: 'http://stuff/' ).scope }

    describe '#out?' do
        it 'returns false' do
            subject.should_not be_out
        end

        context 'when #redundant?' do
            context 'is true' do
                it 'returns true' do
                    subject.stub(:redundant?) { true }
                    subject.should be_out
                end
            end
        end

        context "when #{Arachni::OptionGroups::Audit}#element?" do
            context 'is false' do
                it 'returns true' do
                    Arachni::Options.audit.stub(:element?) { false }
                    subject.should be_out
                end
            end
        end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
arachni-1.2.1 spec/arachni/element/capabilities/with_scope/scope_spec.rb
arachni-1.2 spec/arachni/element/capabilities/with_scope/scope_spec.rb
arachni-1.1 spec/arachni/element/capabilities/with_scope/scope_spec.rb