cyborg_mock_preferences 
Keep mock connections out of real registries and detach them on every exit path.
Vars | |
| previous_directory | GLOB.directory from before the test, so we can put it back |
|---|---|
| previous_persistent_client_list | GLOB.persistent_clients from before the test, so we can put it back |
| previous_persistent_clients | GLOB.persistent_clients_by_ckey from before the test, so we can put it back |
| previous_preferences | GLOB.preferences_datums from before the test, so we can put it back |
Procs | |
| Destroy | Unlinks the mock clients and puts the globals back |
| New | Swaps in empty preference and client globals, so tests never meet real players |
| create_preferences | Returns memory-only preferences on a mock client, linked to robot when given |
Var Details
previous_directory 
GLOB.directory from before the test, so we can put it back
previous_persistent_client_list 
GLOB.persistent_clients from before the test, so we can put it back
previous_persistent_clients 
GLOB.persistent_clients_by_ckey from before the test, so we can put it back
previous_preferences 
GLOB.preferences_datums from before the test, so we can put it back
Proc Details
Destroy
Unlinks the mock clients and puts the globals back
New
Swaps in empty preference and client globals, so tests never meet real players
create_preferences
Returns memory-only preferences on a mock client, linked to robot when given