Sha256: 881d7b72c03608791ebc2f84b4ecf07bac4b547fa51a20a768c61532700d16df

Contents?: true

Size: 747 Bytes

Versions: 3

Compression:

Stored size: 747 Bytes

Contents

require 'ronin/model/has_default_port'

require 'spec_helper'
require 'model/models/default_port_model'
require 'model/models/non_default_port_model'

describe Model::HasDefaultPort do
  it "should define a default_port property" do
  end

  it "should initialize the default_port property if DEFAULT_PORT is defined" do
    model = DefaultPortModel.new

    model.default_port.should == DefaultPortModel::DEFAULT_PORT
  end

  it "should not initialize the default_port property if DEFAULT_PORT is undefined" do
    model = NonDefaultPortModel.new
    model.default_port.should be_nil
  end

  it "should allow default_port to be overridden" do
    model = DefaultPortModel.new(:default_port => 70)

    model.default_port.should == 70
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ronin-exploits-0.3.1 spec/model/has_default_port_spec.rb
ronin-exploits-0.3.0 spec/model/has_default_port_spec.rb
ronin-exploits-0.2.1 spec/model/has_default_port_spec.rb