Created
May 26, 2010 11:10
-
-
Save cowboyd/414353 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
| legolas:purely_functional_data_structures cowboyd$ rake cucumber | |
| (in /Users/cowboyd/Projects/purely_functional_data_structures) | |
| /opt/local/bin/ruby -I "/Users/cowboyd/Projects/cucumber/lib:lib" "/Users/cowboyd/Projects/cucumber/bin/cucumber" | |
| Using the default profile... | |
| Feature: Adding Lists | |
| Scenario: adding to an empty list yields second list # features/adding_lists.feature:3 | |
| Given an empty list "list1" # | |
| And an empty list "list2" # | |
| When I cons "2" to "list2" # | |
| And I add "list1" and "list2" # | |
| Then the sum should equal "list2" # | |
| Scenario: second list is empty yields first list # features/adding_lists.feature:10 | |
| Given an empty list "list1" # | |
| And an empty list "list2" # | |
| When I cons "2" to "list1" # | |
| And I add "list1" and "list2" # | |
| Then the sum should equal "list1" # | |
| Scenario: Adding single-element list # features/adding_lists.feature:17 | |
| Given an empty list "list1" # | |
| And an empty list "list2" # | |
| When I cons "1" to "list1" # | |
| And I cons "2" to "list2" # | |
| And I add "list1" and "list2" # | |
| Then the head of the sum equals the head of "list1" # | |
| Then the tail of the sum equals "list2" # | |
| Scenario: Multiple element lists # features/adding_lists.feature:26 | |
| Given "1,2" as "list1" # | |
| Given "2,3" as "list2" # | |
| When I add "list1" and "list2" # | |
| features/support/env.js:71: Uncaught Expected <'1, 2, 2, 3', > but got <'1, 2', '2, 3', > | |
| Then the sum should be "1,2,2,3" # | |
| Feature: Creating a list from an array | |
| Scenario: Empty array yields empty list # features/create_list_from_array.feature:3 | |
| Given "" as a list # | |
| features/support/env.js:71: Uncaught Expected <true> but got <false> | |
| Then it should be empty # | |
| Scenario: Single element # features/create_list_from_array.feature:7 | |
| Given "1" as a list # | |
| features/support/env.js:71: Uncaught Expected <'1, '> but got <'1', > | |
| Then it should be "1, " # | |
| Scenario: head is 1 # features/create_list_from_array.feature:11 | |
| Given "1,2,3" as a list # | |
| features/support/env.js:71: Uncaught Expected <'1'> but got <'1> | |
| Then the head should be "1" # | |
| Scenario: second item initialized # features/create_list_from_array.feature:15 | |
| Given "1,2,3" as a list # | |
| features/support/env.js:71: Uncaught Expected <'2'> but got <2> | |
| Then the head of the tail should be "2" # | |
| Feature: Lists | |
| Background: Set up the list # features/list_basic_operations.feature:3 | |
| Given an empty list # | |
| Scenario: empty list is empty # features/list_basic_operations.feature:6 | |
| Then it should be empty # | |
| Scenario: cons makes list not empty # features/list_basic_operations.feature:9 | |
| When I cons "1" # | |
| Then it should not be empty # | |
| Scenario: head returns what was just cons-ed # features/list_basic_operations.feature:13 | |
| When I cons "a" # | |
| Then the head should be "a" # | |
| Scenario: empty list has undefined head # features/list_basic_operations.feature:17 | |
| Then the head should be undefined # | |
| Scenario: empty list has undefined tail # features/list_basic_operations.feature:20 | |
| Then the tail should be undefined # | |
| Scenario: cons-ed list has empty tail # features/list_basic_operations.feature:23 | |
| When I cons "foo" # | |
| Then the tail should be empty # | |
| Scenario: getting the head of the tail # features/list_basic_operations.feature:27 | |
| When I cons "foo" # | |
| And I cons "bar" # | |
| Then the head of the tail should be "foo" # | |
| Scenario: toString for single element # features/list_basic_operations.feature:32 | |
| When I cons "foo" # | |
| features/support/env.js:71: Uncaught Expected <'foo, '> but got <'foo', > | |
| Then it should be "foo, " # | |
| Feature: Updating Lists | |
| Scenario: Updating a single element list # features/updating_lists.feature:3 | |
| Given the list "1" # features/updating_lists.feature:4 | |
| When I update item 1 to "b" # features/updating_lists.feature:5 | |
| Then it should be "1, " # | |
| 17 scenarios (1 undefined, 16 passed) | |
| 54 steps (1 skipped, 2 undefined, 51 passed) | |
| 0m2.012s | |
| You can implement step definitions for undefined steps with these snippets: | |
| Given (/^the list "([^\"]*)"$/, function(arg1){ | |
| //express the regexp above with the code you wish you had | |
| }); | |
| When (/^I update item 1 to "([^\"]*)"$/, function(arg1){ | |
| //express the regexp above with the code you wish you had | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment