From 5741a43559624a37ef91b5191386f863960157b7 Mon Sep 17 00:00:00 2001 From: Samuel Owen Date: Thu, 21 Dec 2023 23:42:38 +0000 Subject: [PATCH] add failing test "opens file and writes each line into a list of strings" --- lib/day1/day1_test.exs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/day1/day1_test.exs b/lib/day1/day1_test.exs index 17c951f..fcdf272 100644 --- a/lib/day1/day1_test.exs +++ b/lib/day1/day1_test.exs @@ -5,4 +5,12 @@ defmodule Day1Test do test "finds first and last number from array" do assert Day1.find_first_and_last_number("1abc2") == {1, 2} end + + test "opens file and writes each line to a list of strings" do + assert Day1.parse_file("test/day1_test.txt", :string) == [ + "first line of the file", + "second line of the file", + "third line of the file" + ] + end end