Skip to content

Instantly share code, notes, and snippets.

@johana-star
Created December 10, 2012 01:14
Show Gist options
  • Save johana-star/4247834 to your computer and use it in GitHub Desktop.
Save johana-star/4247834 to your computer and use it in GitHub Desktop.
Feature: Providing passwords at the command line
As a person I need to generate memorable passwords at the command line
In order to have unique passwords anywhere I use them.
Scenario: Simple password
Given the user calls 'dynamo'
Then the program returns a simple passphrase
Scenario: Complex password
Given the user calls 'dynamo --complex'
Then the program returns a complex passphrase
load "bin/dynamo"
Given /^the user calls '(.*)'$/ do |command|
@result = `#{command}`
end
Then /^the program returns a simple passphrase$/ do
@result.split(/\s/).length.should eq 4
end
Then /^the program returns a complex passphrase$/ do
@result.split(/\s|\d|-/).length.should eq 4
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment