Sha256: c1f6c1f2a1dace8355e54a76e3a0f482c946aaaac4059f65d0c5adc8e5eca606

Contents?: true

Size: 759 Bytes

Versions: 15

Compression:

Stored size: 759 Bytes

Contents

require 'spec_helper'

describe Metasploit::Model::Search::Association do
  subject(:base_class) do
    described_class = self.described_class

    Class.new do
      include described_class
    end
  end

  context 'search_association' do
    it 'should add Symbol to search_association_set' do
      association_string = 'associated_things'

      base_class.class_eval do
        search_association association_string
      end

      base_class.search_association_set.should include(association_string.to_sym)
    end
  end

  context 'search_association_set' do
    let(:search_association_set) do
      base_class.search_association_set
    end

    it 'should default to an empty Set' do
      search_association_set.should == Set.new
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
metasploit-model-0.25.7 spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.7-java spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.6 spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.6-java spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.3 spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.3-java spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.2 spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.2-java spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.1 spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.1-java spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups-java spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.24.1-java spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.24.1 spec/lib/metasploit/model/search/association_spec.rb
metasploit-model-0.24.1.pre.semantic.pre.versioning.pre.2.pre.0 spec/lib/metasploit/model/search/association_spec.rb