Fix silly variable scoping issue in item spec

Oh right, `@remote_id` is an instance variable so we can auto-increment
it over time, but `url` is just a derived value, and can just be local!
Silly!
This commit is contained in:
Emi Matchu 2024-11-19 13:32:47 -08:00
parent 91851bc340
commit 21eaf7b266

View file

@ -31,8 +31,8 @@ RSpec.describe Item do
def build_item_asset(zone, body_id:) def build_item_asset(zone, body_id:)
@remote_id = (@remote_id || 0) + 1 @remote_id = (@remote_id || 0) + 1
@url = "https://images.neopets.example/#{@remote_id}.swf" url = "https://images.neopets.example/#{@remote_id}.swf"
SwfAsset.new(type: "object", remote_id: @remote_id, url: @url, SwfAsset.new(type: "object", remote_id: @remote_id, url:,
zones_restrict: "", zone:, body_id:) zones_restrict: "", zone:, body_id:)
end end