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)
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?