Sha256: 303097264f191322719d371c31721787d29eb6a24f3768cc0065fdfd766c522e

Contents?: true

Size: 898 Bytes

Versions: 2

Compression:

Stored size: 898 Bytes

Contents

require 'ronin/platform/maintainer'

require 'spec_helper'

describe Platform::Maintainer do
  before(:all) do
    @named = Platform::Maintainer.new('anonymous')
    @name_with_email = Platform::Maintainer.new('anonymous','anonymous@example.com')
  end

  describe "to_s" do
    it "should return the name when their is no email" do
      @named.to_s.should == 'anonymous'
    end

    it "should return the name and email when both are present" do
      @name_with_email.to_s.should == 'anonymous <anonymous@example.com>'
    end
  end

  describe "inspect" do
    it "should return the name when their is no email" do
      @named.inspect.should == '#<Ronin::Platform::Maintainer: anonymous>'
    end

    it "should return the name and email when both are present" do
      @name_with_email.inspect.should == '#<Ronin::Platform::Maintainer: anonymous <anonymous@example.com>>'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ronin-0.3.0 spec/platform/maintainer_spec.rb
ronin-0.2.4 spec/platform/maintainer_spec.rb