You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need ability to do some post processing on a object after all blueprint attribute initialization is done before it is returned to a test in question.
For example, I am using acl9 gem for authorization. In order to create a user with specific role, I need something like this:
User.blueprint do
name { Faker::Name.first_name }
end
User.blueprint(:student) do
postprocess {
object.has_role!(:student)
# any other post processing on "object"
}
end
Is this doable?
The text was updated successfully, but these errors were encountered:
I am not sure if this feature exists already.
I need ability to do some post processing on a object after all blueprint attribute initialization is done before it is returned to a test in question.
For example, I am using acl9 gem for authorization. In order to create a user with specific role, I need something like this:
User.blueprint do
name { Faker::Name.first_name }
end
User.blueprint(:student) do
postprocess {
object.has_role!(:student)
# any other post processing on "object"
}
end
Is this doable?
The text was updated successfully, but these errors were encountered: