Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Refactor Memozied Helpers #871

Closed
wants to merge 1 commit into from

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented Apr 12, 2013

Use an internal method name to avoid overriding helper methods etc.
This should make behaviour more predictable whilst still allowing super calls.

This fixes #817 (well... works around it...) and rspec/rspec-rails#738.

@myronmarston
Copy link
Member

Thanks for taking a stab at this, @JonRowe. I'm not sure what I think of this solution yet...it feels very hacky to me :(. If we do decide to go with this solution, I'd want a spec that demonstrates the case this works around.

I also don't fully understand the issue yet -- I left a comment over on the rspec-rails issue about that.

@JonRowe
Copy link
Member Author

JonRowe commented Apr 12, 2013

It is a workaround rather than a fix, by calling the method something hidden we can prevent the common use cases where inheritance will break let definitions and still allow us to use super (as the method naming is predictable). I feel a proper fix would be to enforce where the LetDefinitions module is included

@JonRowe
Copy link
Member Author

JonRowe commented Jun 10, 2013

Close in favour of #937

@JonRowe JonRowe closed this Jun 10, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#let doesn't appear to be invoked when defined in a top level describe block in 2.13.0
2 participants