From 9d1928e5e213a4abfd9f6e63502fb7e82ee2bacf Mon Sep 17 00:00:00 2001 From: Shesh Santosh Date: Fri, 14 Feb 2025 16:45:36 +0530 Subject: [PATCH] add multiple conditions of item in texttest_fixture --- ruby/texttest_fixture.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ruby/texttest_fixture.rb b/ruby/texttest_fixture.rb index ad76aacf..98605f28 100644 --- a/ruby/texttest_fixture.rb +++ b/ruby/texttest_fixture.rb @@ -5,15 +5,23 @@ require File.join(File.dirname(__FILE__), 'gilded_rose') puts "OMGHAI!" items = [ Item.new(name="+5 Dexterity Vest", sell_in=10, quality=20), + Item.new(name="+5 Dexterity Vest", sell_in=0, quality=20), + Item.new(name="+5 Dexterity Vest", sell_in=0, quality=0), Item.new(name="Aged Brie", sell_in=2, quality=0), + Item.new(name="Aged Brie", sell_in=0, quality=9), + Item.new(name="Aged Brie", sell_in=2, quality=49), Item.new(name="Elixir of the Mongoose", sell_in=5, quality=7), Item.new(name="Sulfuras, Hand of Ragnaros", sell_in=0, quality=80), Item.new(name="Sulfuras, Hand of Ragnaros", sell_in=-1, quality=80), Item.new(name="Backstage passes to a TAFKAL80ETC concert", sell_in=15, quality=20), Item.new(name="Backstage passes to a TAFKAL80ETC concert", sell_in=10, quality=49), Item.new(name="Backstage passes to a TAFKAL80ETC concert", sell_in=5, quality=49), - # This Conjured item does not work properly yet - Item.new(name="Conjured Mana Cake", sell_in=3, quality=6), # <-- :O + Item.new(name="Backstage passes to a TAFKAL80ETC concert", sell_in=10, quality=45), + Item.new(name="Backstage passes to a TAFKAL80ETC concert", sell_in=5, quality=40), + Item.new(name="Backstage passes to a TAFKAL80ETC concert", sell_in=0, quality=3), + Item.new(name="Conjured Mana Cake", sell_in=3, quality=6), + Item.new(name="Conjured Mana Cake", sell_in=0, quality=6), + Item.new(name="Conjured Mana Cake", sell_in=5, quality=1), ] days = 2