mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-18 07:51:29 +00:00
add tests for sulfuras input
This commit is contained in:
parent
39ff5fee08
commit
f7556aecc0
@ -2,6 +2,7 @@ require 'gilded_rose'
|
|||||||
|
|
||||||
describe GildedRose do
|
describe GildedRose do
|
||||||
let(:potato) { Item.new('potato', 15, 2)}
|
let(:potato) { Item.new('potato', 15, 2)}
|
||||||
|
let(:sulfarus) { Item.new('Sulfuras, Hand of Ragnaros', 50, 80) }
|
||||||
describe "#update_quality" do
|
describe "#update_quality" do
|
||||||
it "does not change the name" do
|
it "does not change the name" do
|
||||||
items = [Item.new("foo", 0, 0)]
|
items = [Item.new("foo", 0, 0)]
|
||||||
@ -47,6 +48,14 @@ let(:potato) { Item.new('potato', 15, 2)}
|
|||||||
expect(items.first.quality).to eq 50
|
expect(items.first.quality).to eq 50
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'Sulfuras input' do
|
||||||
|
it 'does not change' do
|
||||||
|
items = [sulfarus]
|
||||||
|
GildedRose.update_quality(items)
|
||||||
|
expect(items[0]).to eq sulfarus
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user