Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow current_user and params to remain lazy in rspec contexts #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zvkemp
Copy link

@zvkemp zvkemp commented Mar 7, 2024

accessing current_user and params in an around block potentially inverts the order of side effects in previously-lazy rspec variable definitions. For example, in tests that change configuration based on example metadata, that configuration is not yet loaded at the during of RSpec's around callback phase. Since those two attributes seem to be a special case, we can just call them as methods on the RSpec context, and otherwise keep the openstruct behavior for other arbitrary attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant