Project

General

Profile

Actions

Refactor #5201

closed

Ability to disable lazy accessors without need of using `disable_glue_layers` method

Added by Ivan Necas over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Branch:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Preparing test object instancies for unit testing is quite painful process right now,
as it always requires carefully choosing what models should be disablen on glue layer.

This approach also causes troubles with object space occasionally running into issues
with fixtures referencing different constants etc.

With moving the orchestration outside of the AR objects, `disable_glue_layers` helper
method starts to act just as a way how to make sure no external calls are made for loading
data.

It would be better to have `disable_lazy_accessors` and `stub_lazy_accessors` that would
just make sure that when calling lazy accessors, nothing, or just a specific value is returned.

Actions

Also available in: Atom PDF