Skip to content

Instantly share code, notes, and snippets.

View Atalanta's full-sized avatar

Stephen Nelson-Smith Atalanta

  • Ticketmaster
  • Hampshire, UK
View GitHub Profile

Anatomy of a Cucumber test suite

features/                  # Base directory for all your features
features/step_definitions/ # Generic steps used across multiple features
features/support/          # Cucumber bootstrapping directory

On boot, Cucumber will load up features/support/env.rb. This is where you should include all the libraries you want to use. So features/support/env.rb doesn't get cluttered, it's suggested you split out your customisations into

users = search(:users, "repos:*")
shared_repos = search(:git_repos, "url:*")
users.each do |u|
username = u['id']
u["repos"].each do |target, repo|
git "/home/#{username}/#{target}" do
repository repo['repo']