Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 69 lines (60 sloc) 2.599 kB
809ac04 @bdmac Added Turnip and exercise its fabrication steps like we do with Cucumber
bdmac authored
1 Feature: Mongoid Objects
2
3 Scenario: for some generic objects
4 Given 5 authors
5 Then I should see 5 authors in the database
6
7 Scenario: a single detailed object
8 Given the following author:
9 | name | George Orwell |
10 Then I should see 1 author in the database
11 And I should see the following author in the database:
12 | name | George Orwell |
13
14 Scenario: a single detailed object with a multi-word name
15 Given the following "publishing house":
16 | name | Random House |
17 Then I should see 1 "publishing house" in the database
18 And I should see the following "publishing house" in the database:
19 | name | Random House |
20
21 Scenario: multiple detailed objects
22 Given the following authors:
23 | name |
24 | Dr. Seuss |
25 | Shel Silverstein |
26 Then I should see 2 authors in the database
27 And I should see the following author in the database:
28 | name | Dr. Seuss |
29 And I should see the following author in the database:
30 | name | Shel Silverstein |
31
32 Scenario: a parented single detailed object
33 Given 1 author
34 And that author has the following book:
35 | title | 1984 |
36 Then I should see 1 author in the database
37 And that book should be persisted
38 And that book should have "1984" for a "title"
39 And that book should reference that author
40
41 Scenario: a parented object with a multi-word name
42 Given 1 "publishing house"
43 And that "publishing house" has the following "book promoter":
44 | name | Vinnie |
45 Then I should see 1 "publishing house" in the database
46 And that "book promoter" should be persisted
47 And that "book promoter" should have "Vinnie" for a "name"
48 And that "book promoter" should reference that "publishing house"
49
50 Scenario: a multi-word child belongs to a multi-word parent
51 Given 1 "publishing house"
52 And 1 "professional affiliation"
53 And that "publishing house" belongs to that "professional affiliation"
54 Then I should see 1 "publishing house" in the database
55 And I should see 1 "professional affiliation" in the database
56 And that "publishing house" should reference that "professional affiliation"
57
58 Scenario: multiple parented detailed objects
59 Given 1 author
60 And that author has the following books:
61 | title |
62 | 1984 |
63 | Animal Farm |
64 Then I should see 1 author in the database
65 And they should be persisted
66 And they should reference that author
67 And the first should have "1984" for a "title"
68 And the second should have "Animal Farm" for a "title"
Something went wrong with that request. Please try again.