Skip to content

Instantly share code, notes, and snippets.

@jasoares
Created May 4, 2012 17:41
Show Gist options
  • Save jasoares/2596452 to your computer and use it in GitHub Desktop.
Save jasoares/2596452 to your computer and use it in GitHub Desktop.
Cucumber init script for non rails applications
#!/bin/bash
# Create the directory structure
mkdir -p features/step_definitions
mkdir -p features/support
# Create a placeholder for the step_definitions folder
touch features/step_definitions/"$(basename `pwd`)_steps.rb"
# Create the environment file
echo '$: << File.expand_path("../../lib", File.dirname(__FILE__))' > features/support/env.rb
echo "require '$(basename `pwd`)'" >> features/support/env.rb
# Uncomment to Generate sample feature
#echo "Feature: Sample Feature
#
# Scenario: Sample Scenario
# Given the world
# When your whishes come truth
# Then you are happy
#" > features/sample.feature
# Give user some output
echo "Cucumber file structure created successfully."
@tmann-ttc
Copy link

Very useful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment