Sha256: e71ddc386535f5468d9aca29df11f85c48e6075e338134f9ee701349e8fb5612
Contents?: true
Size: 608 Bytes
Versions: 1
Compression:
Stored size: 608 Bytes
Contents
require 'spec_helper' require 'ronin/author' describe Author do describe "#to_s" do subject { described_class.new(:name => 'anonymous') } it "should return the name when their is no email" do expect(subject.to_s).to eq('anonymous') end context "when email is set" do subject do described_class.new( :name => 'anonymous', :email => 'anonymous@example.com' ) end it "should return the name and email when both are present" do expect(subject.to_s).to eq('anonymous <anonymous@example.com>') end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ronin-1.5.1 | spec/author_spec.rb |