From 35b6f253712a6534007bdc4054cb68a43a18a1d0 Mon Sep 17 00:00:00 2001 From: Ben Pepper Date: Fri, 29 Jul 2016 11:47:53 -0600 Subject: [PATCH] fixed instantiation for repos Customer, InvoiceItem, and Transaction repos are being initialized differently then the first three interactions. That are being initialized with .from_csv instead of via SalesEngine. Adhering to the written spec we break the spec harness. --- source/projects/black_thursday/iteration_3.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/projects/black_thursday/iteration_3.markdown b/source/projects/black_thursday/iteration_3.markdown index 05e777385..71d06eaba 100644 --- a/source/projects/black_thursday/iteration_3.markdown +++ b/source/projects/black_thursday/iteration_3.markdown @@ -19,7 +19,7 @@ instances. It offers the following methods: The data can be found in `data/invoice_items.csv` so the instance is created and used like this: ```ruby -ir = InvoiceItemRepository.new +ir = InvoiceItemRepository ir.from_csv("./data/invoice_items.csv") invoice = ir.find_by_id(6) # => @@ -71,7 +71,7 @@ instances. It offers the following methods: The data can be found in `data/transactions.csv` so the instance is created and used like this: ```ruby -tr = TransactionRepository.new +tr = TransactionRepository tr.from_csv("./data/transactions.csv") transaction = tr.find_by_id(6) # => @@ -118,7 +118,7 @@ instances. It offers the following methods: The data can be found in `data/customers.csv` so the instance is created and used like this: ```ruby -cr = CustomerRepository.new +cr = CustomerRepository cr.from_csv("./data/customers.csv") customer = cr.find_by_id(6) # =>