Skip to content

Instantly share code, notes, and snippets.

@ArturT
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArturT/2e4b6620ca40287ee958 to your computer and use it in GitHub Desktop.
Save ArturT/2e4b6620ca40287ee958 to your computer and use it in GitHub Desktop.
it 'increases to 50 when sell_in above 10 and quality is 49' do
item = Item.new('Backstage passes to a TAFKAL80ETC concert', sell_in=15, quality=49)
items = [item]
gilded_rose = described_class.new(items)
gilded_rose.update_quality
expect(item.quality).to eq 50
end
it 'increases to 50 instead of 51 when sell_in at least 5 and quality is 49' do
item = Item.new('Backstage passes to a TAFKAL80ETC concert', sell_in=5, quality=49)
items = [item]
gilded_rose = described_class.new(items)
gilded_rose.update_quality
expect(item.quality).to eq 50
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment