Я обычно пишу это как ...
Given I am logged in as a "<RoleTitle>"
RoleTitle
конечно может быть что-то еще.
Шаг будет выглядеть как
Given /^I am logged in as a "([^"]*)"$/ do |role|
# either run actual steps to register
# OR
# use pickle/factories to setup user accounts, if
# bypassing the registration forms are possible
# Once created I will (try to) create a pickle reference
find_model! %{user: "#{role}"}, {:id => User.last.id} # change approach if you need multiple users
# then log the user in
end