Skip to content

Commit

Permalink
test: backstage incrementa su calidad en 2 si quedan 10 dias o menos …
Browse files Browse the repository at this point in the history
…para venderlo
  • Loading branch information
JulioSerrano committed Aug 5, 2024
1 parent 7918e7c commit e7cde21
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ruby/gilded_rose_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
it "does not change the name" do
items = [Item.new("foo", 0, 0)]
GildedRose.new(items).update_quality()
expect(items[0].name).to eq "fixme"
expect(items[0].name).to eq "foo"
end

context 'para items normales' do
Expand Down Expand Up @@ -68,7 +68,17 @@
context 'para items Backstage Pass' do
it 'incrementa su calidad si quedan más de 10 días para venderlo'

it 'incrementa su calidad en 2 si quedan 10 dias o menos para venderlo'
it 'incrementa su calidad en 2 si quedan 10 dias o menos para venderlo' do
# arrange
@items = [Item.new("Backstage passes to a TAFKAL80ETC concert", 10, 2)]
@gilded = GildedRose.new(@items)

# act
@gilded.update_quality()

# expect
expect(@items[0].quality).to eq 4
end

it 'incrementa su calidad en 3 si quedan 5 dias o menos para venderlo'

Expand Down

0 comments on commit e7cde21

Please sign in to comment.