Sha256: f5059abf5b5c7864450acdc15632838f56e89958f733f48b393fc6add6a1bbf9

Contents?: true

Size: 741 Bytes

Versions: 54

Compression:

Stored size: 741 Bytes

Contents

require 'spec_helper'

describe MetasploitDataModels::Search::Operation::Port::Number do
  context 'CONSTANTS' do
    context 'BITS' do
      subject(:bits) {
        described_class::BITS
      }

      it { should == 16 }
    end

    context 'MAXIMUM' do
      subject(:maxium) {
        described_class::MAXIMUM
      }

      it { should == 65535 }
    end

    context 'MINIMUM' do
      subject(:minimum) {
        described_class::MINIMUM
      }

      it { should == 0 }
    end

    context 'RANGE' do
      subject(:range) {
        described_class::RANGE
      }

      it { should == (0..65535) }
    end
  end

  context 'validations' do
    it { should ensure_inclusion_of(:value).in_range(described_class::RANGE) }
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
metasploit_data_models-0.24.5 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.24.1 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.24.0 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.23.3.pre.autoload spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.23.2 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.23.2-java spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.23.1 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.23.1-java spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.23.0 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.23.0-java spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.8 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.8-java spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.7 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.7-java spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.6 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.6-java spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.5 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.5-java spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.4 spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb
metasploit_data_models-0.22.4-java spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb