You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 20, 2026. It is now read-only.
lkhoward edited this page Mar 11, 2016
·
4 revisions
Huzzah includes a few helper methods for use with Cucumber. You will need to explicitly include the module in Cucumber's world:
World(Huzzah::Cucumber::DSL)
The as method allows you to dynamically reference a role within a Cucumber step definition. For example:
# StepWhen"Dedric"sendsapaymentof"5.00"to"carey.braun@okon.co"# Step DefinitionWhen(/^"([^"]*)" sends a payment of "([^"]*)" to "([^"]*)"$/)do |from_role,amount,to_email|
as(from_role).payment.send_to(to_email,amount)end
Huzzah provides a method to close all browsers for all instantiated roles:
Afterdoclose_browsersend
Although not part of the Huzzah::Cucumber::DSL module, there are a couple of other methods that may come in handy when working with Cucumber:
user=Huzzah::Role.new# Dynamically call a site# user.on(:site_method)user.on(:moolah)# Dynamically call a page# user.moolah.on(:page_method)user.moolah.on(:user_account)