2024-10-21 16:03:58 -07:00
|
|
|
# We replace Neopets::CustomPets methods with a mocked implementation.
|
|
|
|
module Neopets::CustomPets
|
|
|
|
def self.fetch_viewer_data(pet_name, ...)
|
|
|
|
File.open(Rails.root / "spec/mocks/custom_pets/#{pet_name}.json") do |file|
|
|
|
|
HashWithIndifferentAccess.new JSON.load(file)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.fetch_metadata(...)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.fetch_image_hash(pet_name, ...)
|
2024-10-21 16:46:10 -07:00
|
|
|
"m:#{pet_name}"[0, 8] # A mock hash, like `m:thyass` for "thyassa".
|
2024-10-21 16:03:58 -07:00
|
|
|
end
|
|
|
|
end
|