-
Notifications
You must be signed in to change notification settings - Fork 0
/
texttest_fixture.rb
33 lines (29 loc) · 1.16 KB
/
texttest_fixture.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/ruby -w
require File.join(File.dirname(__FILE__),'/lib', 'gilded_rose')
puts "OMGHAI!"
items = [
Item.new(name="+5 Dexterity Vest", sell_in=10, quality=20),
Item.new(name="Aged Brie", sell_in=2, quality=0),
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
]
days = 2
if ARGV.size > 0
days = ARGV[0].to_i + 1
end
gilded_rose = GildedRose.new items
(0...days).each do |day|
puts "-------- day #{day} --------"
puts "name, sellIn, quality"
items.each do |item|
puts item
end
puts ""
gilded_rose.update_quality
end