Skip to content

Instantly share code, notes, and snippets.

@josephwilk
Created August 1, 2010 19:12
Show Gist options
  • Save josephwilk/503655 to your computer and use it in GitHub Desktop.
Save josephwilk/503655 to your computer and use it in GitHub Desktop.
Scenario: Old example with cucumber.yml
Given a standard Cucumber project directory structure
And a file named "features/sample.feature" with:
"""
Feature: Sample
Scenario: this is a test
Given I am just testing stuff
"""
And a file named "features/support/env.rb"
And a file named "features/support/super_env.rb"
And the following profiles are defined:
"""
default: features/sample.feature --require features/support/env.rb -v
super: features/sample.feature --require features/support/super_env.rb -v
"""
Scenario: New example with nice ruby config
Given a standard Cucumber project directory structure
And a file named "features/sample.feature" with:
"""
Feature: Sample
Scenario: this is a test
Given I am just testing stuff
"""
And a file named "features/support/weak_env.rb"
And a file named "features/support/super_env.rb"
And a file named "features/support/env.rb" with:
"""
Cucumber.configure('default') do |c|
c.paths = ["features/sample.feature"]
c.requires = ['features/support/weak_env.rb']
end
Cucumber.configure('super') do |c|
c.paths = ["features/sample.feature"]
c.requires = ['features/support/super_env.rb']
end
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment