Project

General

Profile

Actions

Refactor #5201

closed

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

Added by Ivan Necas about 10 years ago. Updated almost 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 #1

Updated by Ivan Necas almost 10 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Applied in changeset katello|commit:2a93523a7b211338dc914f816068a3183d2668b0.

Actions #2

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 13
Actions

Also available in: Atom PDF