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

Feature request: post processing after object is initialized #94

Open
sjain opened this issue Aug 4, 2011 · 1 comment
Open

Feature request: post processing after object is initialized #94

sjain opened this issue Aug 4, 2011 · 1 comment

Comments

@sjain
Copy link

sjain commented Aug 4, 2011

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?

@sjain
Copy link
Author

sjain commented Aug 4, 2011

I am using machinist 1.0.6 on rails2 project with bundler BTW.

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

No branches or pull requests

1 participant