Sha256: 0647c6839740e238b0736fd66b25aa89181df2167d7b786fc5bd5956db645e06

Contents?: true

Size: 724 Bytes

Versions: 1

Compression:

Stored size: 724 Bytes

Contents

module RubyQuiz2
  describe Person do

    let :name do
      "Luke Skywalker"
    end

    let :email do
      "luke@theforce.net"
    end

    let :related_person do

    end

    subject do
      described_class.new name, email
    end

    it "sets the name" do
      expect(subject.name).to eq name
    end

    it "sets the email" do
      expect(subject.email).to eq email
    end

    it "gets the family name" do
      expect(subject.family_name).to eq "Skywalker"
    end

    it "is in the same family as the other people with the same last name" do
      family_member = described_class.new "Leia Skywalker", "leia@therebellion.org"
      expect(subject.related_to?(family_member)).to eq true
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_quiz_2-1.0.0 spec/lib/ruby_quiz_2/person_spec.rb