Created
December 10, 2012 01:14
-
-
Save johana-star/4247834 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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