mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-11 12:41:23 +00:00
r cleanup
This commit is contained in:
parent
a810814a32
commit
c61cc3e39d
@ -6,27 +6,23 @@ from approvaltests.approvals import verify
|
|||||||
|
|
||||||
|
|
||||||
class GildedRoseTest(unittest.TestCase):
|
class GildedRoseTest(unittest.TestCase):
|
||||||
|
def do_stuff(self, item):
|
||||||
|
thing = Item(item[0], item[1], item[2])
|
||||||
|
gilded_rose = GildedRose([thing])
|
||||||
|
gilded_rose.update_quality()
|
||||||
|
result = str(thing)
|
||||||
|
return result
|
||||||
|
|
||||||
def test_foo(self):
|
def test_foo(self):
|
||||||
inputs = [
|
|
||||||
Item("foo", 0, 0),
|
|
||||||
Item("Aged Brie", 0, 0),
|
|
||||||
Item("Backstage passes to a TAFKAL80ETC concert", 0, 0),
|
|
||||||
]
|
|
||||||
input_Vals = [
|
input_Vals = [
|
||||||
("foo", 0, 0),
|
("foo", 0, 0),
|
||||||
("Aged Brie", 0, 0),
|
("Aged Brie", 0, 0),
|
||||||
("Backstage passes to a TAFKAL80ETC concert", 0, 0),
|
("Backstage passes to a TAFKAL80ETC concert", 0, 0),
|
||||||
]
|
]
|
||||||
output_items = deepcopy(inputs)
|
|
||||||
gilded_rose = GildedRose(output_items)
|
|
||||||
gilded_rose.update_quality()
|
|
||||||
|
|
||||||
to_approve = []
|
to_approve = []
|
||||||
for item in input_Vals:
|
for item in input_Vals:
|
||||||
thing = Item(item[0], item[1], item[2])
|
to_approve.append(self.do_stuff(item))
|
||||||
gilded_rose = GildedRose([thing])
|
|
||||||
gilded_rose.update_quality()
|
|
||||||
to_approve.append(str(thing))
|
|
||||||
|
|
||||||
verify("\n".join(to_approve))
|
verify("\n".join(to_approve))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user