Sha256: c1982f59a77864a65616e21636836c334d3d02066978af1a9ce8ff48eb2f4f4e

Contents?: true

Size: 760 Bytes

Versions: 18

Compression:

Stored size: 760 Bytes

Contents

require 'spec_helper'
require 'ronin/software'

describe Software do
  it "should require name and version attributes" do
    software = Software.new
    software.should_not be_valid

    software.name = 'Test'
    software.should_not be_valid

    software.version = '0.1.0'
    software.should be_valid
  end

  describe "#to_s" do
    it "should be convertable to a String" do
      software = Software.new(
        :name => 'Test', 
        :version => '0.1.0',
        :vendor => {:name => 'TestCo'}
      )

      software.to_s.should == 'TestCo Test 0.1.0'
    end

    it "should ignore the missing vendor information" do
      software = Software.new(:name => 'Test', :version => '0.1.0')

      software.to_s.should == 'Test 0.1.0'
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ronin-1.5.0 spec/software_spec.rb
ronin-1.5.0.rc2 spec/software_spec.rb
ronin-1.5.0.rc1 spec/software_spec.rb
ronin-1.4.1 spec/software_spec.rb
ronin-1.4.0 spec/software_spec.rb
ronin-1.4.0.rc2 spec/software_spec.rb
ronin-1.4.0.rc1 spec/software_spec.rb
ronin-1.3.0 spec/software_spec.rb
ronin-1.2.0 spec/software_spec.rb
ronin-1.1.0 spec/software_spec.rb
ronin-1.1.0.rc3 spec/software_spec.rb
ronin-1.1.0.rc2 spec/software_spec.rb
ronin-1.1.0.rc1 spec/software_spec.rb
ronin-1.0.0 spec/software_spec.rb
ronin-1.0.0.rc3 spec/software_spec.rb
ronin-1.0.0.rc2 spec/software_spec.rb
ronin-1.0.0.rc1 spec/software_spec.rb
ronin-1.0.0.pre4 spec/software_spec.rb