receive_messages(:full_name => "Uğur Özyılmazel") expect(fake_person.full_name).to eq("Uğur Özyılmazel") end it "stubs desired year on a real Time object" do time = Time.new.now allow(time).to receive(:year).and_return(1972) expect(time.year).to eq(1975) end