Imagine we have a table City with the key path City.current.attributes.id = 10
and a function
function isMyCity(my_city_id)
return City.current.attributes.id == my_city_id
end
It would be useful to mock the value of City.current.attributes.id to test isMyCity. However luassert only supports mocking for keys which contain functions. Why not allow mocking for keys that contain other values. Such as the number in our above example.
Looking at the implementation i dont see a reason for this restriction. Is there something im not aware of preventing this?
Imagine we have a table
City
with the key pathCity.current.attributes.id = 10
and a function
It would be useful to mock the value of
City.current.attributes.id
to testisMyCity
. However luassert only supports mocking for keys which contain functions. Why not allow mocking for keys that contain other values. Such as thenumber
in our above example.Looking at the implementation i dont see a reason for this restriction. Is there something im not aware of preventing this?