(./features/step_definitions/function_name_steps.rb)
Given /^the user has an account$/ do
@user = FactoryGirl.create(:user)
end
(./features/support/helper_name_helpers.rb)
module HelperNameHelpers
def create_user
@user = FactoryGirl.create(:user)
end
end
# Tell Cucumber to include the module into each World object for each Scenario
World(HelperNameHelpers)
Given /^the user has an account$/ do
create_user
end
Test should pass now