I noticed this little tid-bit in the readme for pickle:
(The latest version of pickle supports multiple blueprints, for earlier versions of machinist use pickle <= 0.1.10)
I'm running in to a situation where I want to create a user with admin privileges. I've got two machinist blueprints:
User.blueprint do
first_name
last_name
email
password { "password" }
password_confirmation { "password" }
state "active"
end
User.blueprint(:super_admin) do
roles { ["super-admin", "moderator"] }
end
Rather than creating a custom step for myself to create the super-admin user, I was wondering if there's a way to do it using Pickle.
Using the following will use the normal pickle step and reference the basic machinist User blueprint:
Given a user exists with first_name: "Test", last_name: "Man"
The question is, how do I say that I want a super-admin user?