Skip to content

Conversation

neilvcarvalho
Copy link
Member

(originally from @mohammednasser-32 - I couldn't push modifications to your branch, so I'm creating a new one with your original commits and my new ones)

Fixes #1633
Supersedes #1639

add support for before(:build) callback as requested in the issue

Tested the changes by adding the local gem to a project
image
image

mohammednasser-32 and others added 5 commits August 1, 2025 15:55
change the approach for calling the before_build_callback, now it is called before the object is built, and thus called without any attributes
end

def result(evaluation)
evaluation.notify(:before_build, nil)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added only to the strategies that also trigger after_build, skipping build_stubbed (debatable) and attributes_for

@neilvcarvalho neilvcarvalho merged commit f14a63e into main Aug 4, 2025
25 checks passed
@neilvcarvalho neilvcarvalho deleted the nc-add-before-build-callback branch August 4, 2025 12:56
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.

Support for callback before(:build)

2 participants