From d963dd3a8622370af70fa5f5b4ae639d23f4b1d7 Mon Sep 17 00:00:00 2001 From: Fatma Hussein Date: Wed, 25 Oct 2023 14:58:29 +0300 Subject: [PATCH] fix test errors --- author.rb | 4 ++-- json/authors.json | 2 +- json/games.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/author.rb b/author.rb index e7bed75..8f8a537 100644 --- a/author.rb +++ b/author.rb @@ -1,12 +1,12 @@ class Author attr_reader :id, :first_name, :last_name - attr_accessor :authors + attr_accessor :items def initialize(first_name, last_name) @id = Random.rand(1..1000) @first_name = first_name @last_name = last_name - @authors = [] + @items = [] end def add_item(item) diff --git a/json/authors.json b/json/authors.json index 79a27a8..72248f0 100644 --- a/json/authors.json +++ b/json/authors.json @@ -1 +1 @@ -[{"id":359,"first_name":"Fatma","last_name":"Hussein"}] \ No newline at end of file +[{"id":639,"first_name":359,"last_name":null},{"id":470,"first_name":"fh","last_name":null}] \ No newline at end of file diff --git a/json/games.json b/json/games.json index 04f0d60..9153d11 100644 --- a/json/games.json +++ b/json/games.json @@ -1 +1 @@ -[{"publish_date":"GOT","archived":true,"multiplayer":true,"last_played_at":"20/19/1990"}] \ No newline at end of file +[{"publish_date":"GOT","archived":true,"multiplayer":true,"last_played_at":"20/19/1990"},{"publish_date":"10/10/1990","archived":true,"multiplayer":true,"last_played_at":"20/20/2990"}] \ No newline at end of file