Permalink
Browse files

Split a test out into its own feature file

  • Loading branch information...
1 parent 5f178b5 commit b999ee74eb05893c5938410d27b7c4775d8ae4a0 @mike-burns mike-burns committed Nov 11, 2010
Showing with 77 additions and 65 deletions.
  1. +77 −0 features/asking_for_a_date.feature
  2. +0 −65 features/the_app.feature
@@ -0,0 +1,77 @@
+Feature: Asking for a date
+
+ Scenario: People ask for dates
+ Given the following users exist:
+ | Phone Number | Male | Female | Looking For Male | Looking For Female | Dob | Looking For Minimum Age | Looking For Maximum Age | Description | Name |
+ | 11111111111 | true | false | false | true | 11/06/1989 | 18 | 34 | red hair | Mike |
+ | 12222222222 | true | false | false | true | 10/20/1989 | 18 | 34 | black shirt | Jason |
+ | 18004688487 | false| true | true | false | 12/31/1977 | 14 | 22 | super hot | Emma |
+ Given the following users exist:
+ | Phone Number | Male | Looking For Female | Dob | Looking For Minimum Age | Looking For Maximum Age |
+ | 13333333333 | true | true | 11/06/1989 | 18 | 34 |
+ | 14444444444 | true | true | 11/06/1989 | 18 | 34 |
+ | 15555555555 | true | true | 11/06/1989 | 18 | 34 |
+ | 16666666666 | true | true | 11/06/1989 | 18 | 34 |
+ | 17777777777 | true | true | 11/06/1989 | 18 | 34 |
+ | 18888888888 | true | true | 11/06/1989 | 18 | 34 |
+ | 19999999999 | true | true | 11/06/1989 | 18 | 34 |
+ | 10000000000 | true | true | 11/06/1989 | 18 | 34 |
+ | 11111111112 | true | true | 11/06/1989 | 18 | 34 |
+ And the day and time is "October 16, 2010 8:00pm edt"
+ And the following date suggestions exist:
+ | text |
+ | Silvertone |
+ | Mike's Apartment |
+ And jobs are cleared
+
+ When "18004688487" texts instalover with "new date"
+ Then "18004688487" should get a text "Should we find you a date at Silvertone at 09:00PM? Reply 'ok' or 'new date' to try again."
+
+ When "18004688487" texts instalover with "ok"
+ Then "11111111111" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
+ And "12222222222" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
+ And "13333333333" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
+ And "14444444444" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
+ And "15555555555" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
+ But "16666666666" should not get a text whose message includes "Want to go on a date"
+
+ When jobs in 5 minutes from now are processed
+
+ Then "18004688487" should get a text "We called every number in our little black book, but only got answering machines. Try again later? Reply 'new date' to start again."
+ And "11111111111" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
+ And "12222222222" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
+ And "13333333333" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
+ And "14444444444" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
+ And "15555555555" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
+ But "16666666666" should not get a text whose message includes "Too slow!"
+
+ Given I clear the text message history
+ When "18004688487" texts instalover with "new date"
+ Then "18004688487" should get a text whose message includes "Reply 'ok' or 'new date'"
+ When "18004688487" texts instalover with "ok"
+ Then "11111111111" should not get a text whose message includes "Want to go on a date"
+ And "12222222222" should not get a text whose message includes "Want to go on a date"
+ And "13333333333" should not get a text whose message includes "Want to go on a date"
+ And "14444444444" should not get a text whose message includes "Want to go on a date"
+ And "15555555555" should not get a text whose message includes "Want to go on a date"
+ But "16666666666" should get a text whose message includes "Want to go on a date"
+
+ Given jobs in 5 minutes from now are processed
+ And I clear the text message history
+ When "18004688487" texts instalover with "new date"
+ Then "18004688487" should get a text whose message includes "Reply 'ok' or 'new date'"
+ When "18004688487" texts instalover with "ok"
+ Then "11111111111" should not get a text whose message includes "Want to go on a date"
+ And "12222222222" should not get a text whose message includes "Want to go on a date"
+ And "13333333333" should not get a text whose message includes "Want to go on a date"
+ And "14444444444" should not get a text whose message includes "Want to go on a date"
+ And "15555555555" should not get a text whose message includes "Want to go on a date"
+ And "16666666666" should not get a text whose message includes "Want to go on a date"
+ But "11111111112" should get a text whose message includes "Want to go on a date"
+
+ Given jobs in 5 minutes from now are processed
+ And it is 1 hour later
+ And I clear the text message history
+ When "18004688487" texts instalover with "new date"
+ Then "18004688487" should get a text whose message includes "Reply 'ok' or 'new date'"
+ When "18004688487" texts instalover with "ok"
@@ -109,71 +109,6 @@ Feature: The whole app
And "12222222222" texts instalover with "ok"
Then "18004688487" should not get a text whose message includes "Want to go on a date with Jason at Mike's Apartment"
- Scenario: Existing user asks for a date, but they get turned down
- Given the following users exist:
- | Phone Number | Male | Looking For Female | Dob | Looking For Minimum Age | Looking For Maximum Age |
- | 13333333333 | true | true | 11/06/1989 | 18 | 34 |
- | 14444444444 | true | true | 11/06/1989 | 18 | 34 |
- | 15555555555 | true | true | 11/06/1989 | 18 | 34 |
- | 16666666666 | true | true | 11/06/1989 | 18 | 34 |
- | 17777777777 | true | true | 11/06/1989 | 18 | 34 |
- | 18888888888 | true | true | 11/06/1989 | 18 | 34 |
- | 19999999999 | true | true | 11/06/1989 | 18 | 34 |
- | 10000000000 | true | true | 11/06/1989 | 18 | 34 |
- | 11111111112 | true | true | 11/06/1989 | 18 | 34 |
-
- When "18004688487" texts instalover with "new date"
- Then "18004688487" should get a text "Should we find you a date at Silvertone at 09:00PM? Reply 'ok' or 'new date' to try again."
-
- When "18004688487" texts instalover with "ok"
- Then "11111111111" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
- And "12222222222" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
- And "13333333333" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
- And "14444444444" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
- And "15555555555" should get a text "Want to go on a date with Emma at Silvertone at 09:00PM? Reply 'accept' or ignore."
- But "16666666666" should not get a text whose message includes "Want to go on a date"
-
- When jobs in 5 minutes from now are processed
-
- Then "18004688487" should get a text "We called every number in our little black book, but only got answering machines. Try again later? Reply 'new date' to start again."
- And "11111111111" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
- And "12222222222" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
- And "13333333333" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
- And "14444444444" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
- And "15555555555" should get a text "Too slow! Would you like to get a date? Reply 'new date'."
- But "16666666666" should not get a text whose message includes "Too slow!"
-
- Given I clear the text message history
- When "18004688487" texts instalover with "new date"
- Then "18004688487" should get a text whose message includes "Reply 'ok' or 'new date'"
- When "18004688487" texts instalover with "ok"
- Then "11111111111" should not get a text whose message includes "Want to go on a date"
- And "12222222222" should not get a text whose message includes "Want to go on a date"
- And "13333333333" should not get a text whose message includes "Want to go on a date"
- And "14444444444" should not get a text whose message includes "Want to go on a date"
- And "15555555555" should not get a text whose message includes "Want to go on a date"
- But "16666666666" should get a text whose message includes "Want to go on a date"
-
- Given jobs in 5 minutes from now are processed
- And I clear the text message history
- When "18004688487" texts instalover with "new date"
- Then "18004688487" should get a text whose message includes "Reply 'ok' or 'new date'"
- When "18004688487" texts instalover with "ok"
- Then "11111111111" should not get a text whose message includes "Want to go on a date"
- And "12222222222" should not get a text whose message includes "Want to go on a date"
- And "13333333333" should not get a text whose message includes "Want to go on a date"
- And "14444444444" should not get a text whose message includes "Want to go on a date"
- And "15555555555" should not get a text whose message includes "Want to go on a date"
- And "16666666666" should not get a text whose message includes "Want to go on a date"
- But "11111111112" should get a text whose message includes "Want to go on a date"
-
- Given jobs in 5 minutes from now are processed
- And it is 1 hour later
- And I clear the text message history
- When "18004688487" texts instalover with "new date"
- Then "18004688487" should get a text whose message includes "Reply 'ok' or 'new date'"
- When "18004688487" texts instalover with "ok"
-
Scenario: Emma realizes that Chad cockblocked her
Given the following users exist:
| Phone Number | Male | Looking For Female | Dob | Looking For Minimum Age | Looking For Maximum Age | Name |

0 comments on commit b999ee7

Please sign in to comment.