├── .editorconfig
├── .gitignore
├── Idiomatic Spock.iml
├── Idiomatic Spock.key.zip
├── Idiomatic Spock.key
├── Data
│ ├── 120414_FamilySouthAfrica_AT_2300_981x654-small-6121.jpg
│ ├── 120414_FamilySouthAfrica_AT_2936_3000x2000-small-6117.jpg
│ ├── 120414_FamilySouthAfrica_AT_2991_2190x1460-small-6123.jpg
│ ├── 120414_FamilySouthAfrica_AT_4083_981x654-small-6122.jpg
│ ├── apieceoftheactionhd0849-3063.jpg
│ ├── apieceoftheactionhd0849-enhanced-3066.jpeg
│ ├── apieceoftheactionhd0849-small-3064.jpg
│ ├── mt0@2x-7004.jpg
│ ├── mt10@2x-6321.jpg
│ ├── mt11@2x-6322.jpg
│ ├── mt12@2x-7130.jpg
│ ├── mt13@2x-6316.jpg
│ ├── mt14@2x-6393.jpg
│ ├── mt1@2x-7005.jpg
│ ├── mt2@2x-6906.jpg
│ ├── mt3@2x-7006.jpg
│ ├── mt4@2x-6907.jpg
│ ├── mt5@2x-6908.jpg
│ ├── mt6@2x-8995.jpg
│ ├── mt7@2x-8996.jpg
│ ├── mt8@2x-8997.jpg
│ ├── mt9@2x-6911.jpg
│ ├── pasted-image-10461.tif
│ ├── pasted-image-10494.png
│ ├── pasted-image-10688.tif
│ ├── pasted-image-1733.tif
│ ├── pasted-image-2224.tif
│ ├── pasted-image-419.tif
│ ├── pasted-image-426.tif
│ ├── pasted-image-5296.png
│ ├── pasted-image-9544.tif
│ ├── pasted-image-9639.png
│ ├── pasted-image-9640.png
│ ├── pasted-image-enhanced-10465.jpeg
│ ├── pasted-image-enhanced-10497.jpeg
│ ├── pasted-image-enhanced-10696.jpeg
│ ├── pasted-image-enhanced-2155.jpeg
│ ├── pasted-image-enhanced-2179.jpeg
│ ├── pasted-image-enhanced-2182.jpeg
│ ├── pasted-image-enhanced-2252.jpeg
│ ├── pasted-image-enhanced-5299.jpeg
│ ├── pasted-image-enhanced-9549.png
│ ├── pasted-image-small-10462.png
│ ├── pasted-image-small-10495.png
│ ├── pasted-image-small-10693.png
│ ├── pasted-image-small-1734.png
│ ├── pasted-image-small-420.png
│ ├── pasted-image-small-427.png
│ ├── pasted-image-small-5297.png
│ ├── pasted-image-small-9545.png
│ ├── pasted-image-small-9641.png
│ ├── presentation-16-9-3019.png
│ ├── presentation-16-9-pages-6105.png
│ ├── st0-10711.jpg
│ ├── st1-7931.jpg
│ ├── st10-7102.jpg
│ ├── st107-10710.jpg
│ ├── st11-10318.jpg
│ ├── st11-9057.jpg
│ ├── st12-10317.jpg
│ ├── st12-6915.jpg
│ ├── st13-10316.jpg
│ ├── st14-10315.jpg
│ ├── st15-10314.jpg
│ ├── st16-9861.jpg
│ ├── st17-9837.jpg
│ ├── st18-10159.jpg
│ ├── st18-7009.jpg
│ ├── st19-10712.jpg
│ ├── st19-9855.jpg
│ ├── st20-10163.jpg
│ ├── st22-7010.jpg
│ ├── st23-9004.jpg
│ ├── st24-10203.jpg
│ ├── st24-9006.jpg
│ ├── st25-10167.jpg
│ ├── st25-9007.jpg
│ ├── st26-10087.jpg
│ ├── st27-9008.jpg
│ ├── st27-9116.jpg
│ ├── st28-9009.jpg
│ ├── st29-9010.jpg
│ ├── st3-10325.jpg
│ ├── st31-10089.jpg
│ ├── st31-9011.jpg
│ ├── st32-9281.jpg
│ ├── st33-10204.jpg
│ ├── st33-9290.jpg
│ ├── st34-10207.jpg
│ ├── st34-9292.jpg
│ ├── st35-7132.jpg
│ ├── st35-9296.jpg
│ ├── st36-7027.jpg
│ ├── st36-7138.jpg
│ ├── st38-9262.jpg
│ ├── st39-10499.jpg
│ ├── st39-9299.jpg
│ ├── st4-6900.jpg
│ ├── st40-7031.jpg
│ ├── st40-9300.jpg
│ ├── st42-9016.jpg
│ ├── st43-9017.jpg
│ ├── st43-9303.jpg
│ ├── st44-10492.jpg
│ ├── st44-9018.jpg
│ ├── st46-9020.jpg
│ ├── st49-6952.jpg
│ ├── st49-9022.jpg
│ ├── st5-10324.jpg
│ ├── st5-2734.jpg
│ ├── st52-6955.jpg
│ ├── st52-7152.jpg
│ ├── st52-9023.jpg
│ ├── st53-10521.jpg
│ ├── st53-6956.jpg
│ ├── st54-10540.jpg
│ ├── st54-9186.jpg
│ ├── st56-10539.jpg
│ ├── st57-6960.jpg
│ ├── st58-6961.jpg
│ ├── st59-10209.jpg
│ ├── st59-9026.jpg
│ ├── st6-10319.jpg
│ ├── st60-9027.jpg
│ ├── st61-6964.jpg
│ ├── st61-9533.jpg
│ ├── st63-9028.jpg
│ ├── st64-9029.jpg
│ ├── st69-7013.jpg
│ ├── st7-10321.jpg
│ ├── st71-9073.jpg
│ ├── st72-9097.jpg
│ ├── st73-10549.jpg
│ ├── st73-10685.jpg
│ ├── st74-10618.jpg
│ ├── st74-10687.jpg
│ ├── st74-7014.jpg
│ ├── st74-9033.jpg
│ ├── st74-9634.jpg
│ ├── st75-6978.jpg
│ ├── st75-9034.jpg
│ ├── st76-9035.jpg
│ ├── st78-6981.jpg
│ ├── st8-10322.jpg
│ ├── st80-10350.jpg
│ ├── st80-7734.jpg
│ ├── st82-10102.jpg
│ ├── st83-10114.jpg
│ ├── st85-10136.jpg
│ ├── st85-9040.jpg
│ ├── st86-9041.jpg
│ ├── st88-10372.jpg
│ ├── st88-9042.jpg
│ ├── st89-10373.jpg
│ ├── st89-9635.jpg
│ ├── st9-10323.jpg
│ ├── st90-10460.jpg
│ ├── st92-9418.jpg
│ ├── st93-10355.jpg
│ ├── st97-10144.jpg
│ └── st98-10148.jpg
├── Index.zip
├── Metadata
│ ├── BuildVersionHistory.plist
│ ├── DocumentIdentifier
│ └── Properties.plist
├── preview-micro.jpg
├── preview-web.jpg
└── preview.jpg
├── Idiomatic Spock.pdf
├── README.md
├── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── notes.md
└── src
├── main
├── groovy
│ └── idiomaticspock
│ │ ├── doublepipes
│ │ └── StringStyleCategory.groovy
│ │ └── starships
│ │ ├── BindShip.groovy
│ │ ├── ImmutableCollectionContainerBuilder.groovy
│ │ ├── ImmutableCollectionContainerBuilderFactory.groovy
│ │ ├── MemoryShipStore.groovy
│ │ ├── PersistentShipStore.groovy
│ │ ├── Ship.groovy
│ │ ├── ShipMapper.groovy
│ │ └── ShipStore.groovy
└── resources
│ ├── moment-with-langs.js
│ └── test.txt
└── test
└── groovy
└── idiomaticspock
├── autocleanup
├── AutoCleanup1Spec.groovy
├── AutoCleanup2Spec.groovy
└── AutoCleanup3Spec.groovy
├── conditional
├── Network.groovy
└── RequiresNetworkSpec.groovy
├── datadriving
└── PrimaryKeySpec.groovy
├── descriptioninunroll
└── DescriptionInUnrollSpec.groovy
├── doublepipes
└── DoublePipeWhereBlockSpec.groovy
├── failfast
└── FailFastSpec.groovy
├── falsemonicker
└── FalseMonikerSpec.groovy
├── functionalstyle
└── EverySpec.groovy
├── helpermethods
├── HelperMethodsAfterSpec.groovy
├── HelperMethodsBeforeSpec.groovy
└── traits
│ ├── ShipStoreHelpers.groovy
│ └── TraitCompositionSpec.groovy
├── nashorn
└── FriendlyDateSpec.groovy
├── old
└── OldSpec.groovy
├── rules
└── CopySpec.groovy
├── separatedatafromlogic
└── SeparateDataFromLogicSpec.groovy
├── stepwise
└── StackSpec.groovy
├── tautological
└── TautologicalSpec.groovy
├── tck
├── MemoryShipStoreSpec.groovy
├── PersistentShipStoreSpec.groovy
└── ShipStoreSpec.groovy
└── whenthenwhenthen
└── RunOnSpec.groovy
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | trim_trailing_whitespace = true
8 | indent_style = space
9 | indent_size = 2
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.gradle/
2 | /build/
3 |
4 | /.idea/
5 | *.iml
6 |
7 | /.gradletasknamecache
8 |
9 | /*.png
10 | /*.jpg
11 | /*.gif
12 | .DS_Store
13 |
--------------------------------------------------------------------------------
/Idiomatic Spock.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Idiomatic Spock.key.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key.zip
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/120414_FamilySouthAfrica_AT_2300_981x654-small-6121.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/120414_FamilySouthAfrica_AT_2300_981x654-small-6121.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/120414_FamilySouthAfrica_AT_2936_3000x2000-small-6117.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/120414_FamilySouthAfrica_AT_2936_3000x2000-small-6117.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/120414_FamilySouthAfrica_AT_2991_2190x1460-small-6123.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/120414_FamilySouthAfrica_AT_2991_2190x1460-small-6123.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/120414_FamilySouthAfrica_AT_4083_981x654-small-6122.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/120414_FamilySouthAfrica_AT_4083_981x654-small-6122.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/apieceoftheactionhd0849-3063.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/apieceoftheactionhd0849-3063.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/apieceoftheactionhd0849-enhanced-3066.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/apieceoftheactionhd0849-enhanced-3066.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/apieceoftheactionhd0849-small-3064.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/apieceoftheactionhd0849-small-3064.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt0@2x-7004.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt0@2x-7004.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt10@2x-6321.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt10@2x-6321.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt11@2x-6322.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt11@2x-6322.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt12@2x-7130.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt12@2x-7130.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt13@2x-6316.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt13@2x-6316.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt14@2x-6393.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt14@2x-6393.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt1@2x-7005.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt1@2x-7005.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt2@2x-6906.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt2@2x-6906.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt3@2x-7006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt3@2x-7006.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt4@2x-6907.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt4@2x-6907.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt5@2x-6908.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt5@2x-6908.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt6@2x-8995.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt6@2x-8995.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt7@2x-8996.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt7@2x-8996.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt8@2x-8997.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt8@2x-8997.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/mt9@2x-6911.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/mt9@2x-6911.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-10461.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-10461.tif
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-10494.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-10494.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-10688.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-10688.tif
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-1733.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-1733.tif
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-2224.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-2224.tif
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-419.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-419.tif
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-426.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-426.tif
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-5296.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-5296.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-9544.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-9544.tif
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-9639.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-9639.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-9640.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-9640.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-10465.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-10465.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-10497.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-10497.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-10696.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-10696.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-2155.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-2155.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-2179.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-2179.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-2182.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-2182.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-2252.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-2252.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-5299.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-5299.jpeg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-enhanced-9549.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-enhanced-9549.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-10462.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-10462.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-10495.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-10495.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-10693.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-10693.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-1734.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-1734.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-420.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-420.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-427.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-427.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-5297.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-5297.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-9545.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-9545.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/pasted-image-small-9641.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/pasted-image-small-9641.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/presentation-16-9-3019.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/presentation-16-9-3019.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/presentation-16-9-pages-6105.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/presentation-16-9-pages-6105.png
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st0-10711.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st0-10711.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st1-7931.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st1-7931.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st10-7102.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st10-7102.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st107-10710.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st107-10710.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st11-10318.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st11-10318.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st11-9057.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st11-9057.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st12-10317.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st12-10317.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st12-6915.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st12-6915.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st13-10316.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st13-10316.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st14-10315.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st14-10315.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st15-10314.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st15-10314.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st16-9861.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st16-9861.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st17-9837.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st17-9837.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st18-10159.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st18-10159.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st18-7009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st18-7009.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st19-10712.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st19-10712.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st19-9855.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st19-9855.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st20-10163.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st20-10163.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st22-7010.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st22-7010.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st23-9004.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st23-9004.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st24-10203.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st24-10203.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st24-9006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st24-9006.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st25-10167.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st25-10167.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st25-9007.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st25-9007.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st26-10087.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st26-10087.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st27-9008.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st27-9008.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st27-9116.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st27-9116.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st28-9009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st28-9009.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st29-9010.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st29-9010.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st3-10325.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st3-10325.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st31-10089.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st31-10089.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st31-9011.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st31-9011.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st32-9281.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st32-9281.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st33-10204.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st33-10204.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st33-9290.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st33-9290.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st34-10207.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st34-10207.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st34-9292.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st34-9292.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st35-7132.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st35-7132.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st35-9296.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st35-9296.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st36-7027.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st36-7027.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st36-7138.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st36-7138.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st38-9262.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st38-9262.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st39-10499.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st39-10499.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st39-9299.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st39-9299.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st4-6900.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st4-6900.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st40-7031.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st40-7031.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st40-9300.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st40-9300.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st42-9016.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st42-9016.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st43-9017.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st43-9017.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st43-9303.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st43-9303.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st44-10492.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st44-10492.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st44-9018.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st44-9018.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st46-9020.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st46-9020.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st49-6952.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st49-6952.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st49-9022.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st49-9022.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st5-10324.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st5-10324.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st5-2734.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st5-2734.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st52-6955.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st52-6955.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st52-7152.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st52-7152.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st52-9023.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st52-9023.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st53-10521.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st53-10521.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st53-6956.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st53-6956.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st54-10540.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st54-10540.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st54-9186.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st54-9186.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st56-10539.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st56-10539.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st57-6960.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st57-6960.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st58-6961.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st58-6961.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st59-10209.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st59-10209.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st59-9026.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st59-9026.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st6-10319.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st6-10319.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st60-9027.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st60-9027.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st61-6964.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st61-6964.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st61-9533.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st61-9533.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st63-9028.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st63-9028.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st64-9029.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st64-9029.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st69-7013.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st69-7013.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st7-10321.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st7-10321.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st71-9073.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st71-9073.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st72-9097.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st72-9097.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st73-10549.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st73-10549.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st73-10685.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st73-10685.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st74-10618.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st74-10618.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st74-10687.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st74-10687.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st74-7014.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st74-7014.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st74-9033.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st74-9033.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st74-9634.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st74-9634.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st75-6978.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st75-6978.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st75-9034.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st75-9034.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st76-9035.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st76-9035.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st78-6981.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st78-6981.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st8-10322.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st8-10322.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st80-10350.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st80-10350.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st80-7734.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st80-7734.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st82-10102.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st82-10102.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st83-10114.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st83-10114.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st85-10136.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st85-10136.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st85-9040.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st85-9040.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st86-9041.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st86-9041.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st88-10372.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st88-10372.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st88-9042.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st88-9042.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st89-10373.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st89-10373.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st89-9635.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st89-9635.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st9-10323.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st9-10323.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st90-10460.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st90-10460.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st92-9418.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st92-9418.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st93-10355.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st93-10355.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st97-10144.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st97-10144.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Data/st98-10148.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Data/st98-10148.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Index.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Index.zip
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Metadata/BuildVersionHistory.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | pptx
6 | M6.2-1861-1
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Metadata/DocumentIdentifier:
--------------------------------------------------------------------------------
1 | B4C7984A-DE75-4446-B764-A1503BE0E9EB
--------------------------------------------------------------------------------
/Idiomatic Spock.key/Metadata/Properties.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/Metadata/Properties.plist
--------------------------------------------------------------------------------
/Idiomatic Spock.key/preview-micro.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/preview-micro.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/preview-web.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/preview-web.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.key/preview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.key/preview.jpg
--------------------------------------------------------------------------------
/Idiomatic Spock.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/Idiomatic Spock.pdf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Idiomatic Spock
2 |
3 | This is a presentation given at gr8conf 2014 in Copenhagen.
4 |
5 | The slides are available in…
6 |
7 | * [PDF](https://github.com/robfletcher/idiomatic-spock/blob/master/Idiomatic%20Spock.pdf)
8 | * [Keynote format](https://github.com/robfletcher/idiomatic-spock/tree/master/Idiomatic%20Spock.key.zip)
9 | * [HTML](http://freeside.co/idiomatic-spock/)
10 |
11 | For Keynote and HTML formats you will need [Fira Mono](http://dev.carrois.com/fira-3-1/) and [Horizon BT](http://www.azfonts.net/load_font/horizon_bt.html) fonts installed for the slides to render correctly. The PDF has the fonts embedded so it's the best option if you just want to read through the slides.
12 |
13 | ## Code
14 |
15 | In addition to the slide there is a small set of example specifications to support the talk. If you have JDK 8 installed you should be able to run the tests using `./gradlew`. JDK 8 is needed as I'm using Nashorn and the Java 8 time API.
16 |
17 | ## Credits
18 |
19 | * Breaking down long tests using helper methods, mixins & traits are applications of Uncle Bob Martin's [Clean Code](http://www.goodreads.com/book/show/3735293-clean-code) principles.
20 | * Luke Daley showed me the idea of using `expect` blocks to enforce preconditions.
21 | * An emphasis on diagnostic quality is a point made in [Growing Object Oriented Software Guided by Tests](http://www.growing-object-oriented-software.com) by Steve Freeman and Nat Pryce.
22 | * I think *"never trust a test you haven't seen fail"* was a quote from [Colin Vipurs](https://twitter.com/tddmonkey)' talk on testing anti-patterns at [Devoxx UK 2013](http://www.devoxx.com/display/UK13/I+hate+writing+unit+tests%2C+how+come+everybody+else+enjoys+it).
23 | * The section on separating test data from test logic is based on a blog post by [J. B. Rainsberger](http://jbrains.ca/) that I can't seem to find now.
24 | * *False moniker* is an anti-pattern written about by Max Ashton [here](http://stateyourbizness.blogspot.co.uk/2008/07/good-unit-testing-practice.html).
25 | * David Norton of Object Partners wrote about [testing JavaScript using Spock and Nashorn](http://www.objectpartners.com/2014/05/29/unit-test-your-server-side-javascript-with-spock/).
26 | * Spock is the creation of [Peter Niederwieser](https://twitter.com/pniederw)
27 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "groovy"
2 |
3 | repositories {
4 | jcenter()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | compile "org.codehaus.groovy:groovy-all:2.3.6:indy"
10 | compile "com.google.guava:guava:17.0"
11 | compile "org.jdbi:jdbi:2.53"
12 | compile "com.netflix.rxjava:rxjava-core:0.18.3"
13 | compile "com.h2database:h2:1.4.178"
14 | if (!JavaVersion.current().isJava8Compatible()) {
15 | compile "org.threeten:threetenbp:0.9"
16 | }
17 |
18 | testCompile("org.spockframework:spock-core:0.7-groovy-2.0") {
19 | exclude module: "groovy-all"
20 | }
21 | }
22 |
23 | tasks.withType(GroovyCompile) {
24 | groovyOptions.optimizationOptions.indy = true
25 | }
26 |
27 | defaultTasks "check"
28 |
29 | test {
30 | testLogging {
31 | events "passed", "skipped", "failed", "standardOut", "standardError"
32 | }
33 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robfletcher/idiomatic-spock/e0026d9f696f21486adec3cde36d2f00599b3cc9/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon May 19 21:57:51 BST 2014
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/notes.md:
--------------------------------------------------------------------------------
1 | ## Things not covered at gr8conf EU 2014
2 |
3 | * @ConfineMetaClassChanges to automatically de-fuck the metaclass
4 | * *Measuring by* code coverage is an organizational anti-pattern
5 | * Not saying code coverage isn't useful
6 | * Only tells you what *definitely isn't* tested not what is
7 |
8 | ## Questions
9 |
10 | * Can you access the mocking API from a trait?
11 | * Appears not but a better approach would be to define an abstract factory method in the trait and implement it to return a mock/stub in the spec
12 |
13 | ## Errors
14 |
15 | * `expect` block cannot go before `given` the way I showed it. But it can go before `where` so the technique is valid.
16 | * should assert collections are not empty when using `every`
17 |
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/doublepipes/StringStyleCategory.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.doublepipes
2 |
3 | import com.google.common.base.CaseFormat
4 | import groovy.transform.CompileStatic
5 |
6 | @CompileStatic
7 | @Category(String)
8 | class StringStyleCategory {
9 | String convert(CaseFormat style) {
10 | CaseFormat.UPPER_UNDERSCORE.to(style, this.toString().toUpperCase().replaceAll(/\s+/, "_"))
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/starships/BindShip.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.starships
2 |
3 | import org.skife.jdbi.v2.SQLStatement
4 | import org.skife.jdbi.v2.sqlobject.Binder
5 | import org.skife.jdbi.v2.sqlobject.BinderFactory
6 | import org.skife.jdbi.v2.sqlobject.BindingAnnotation
7 |
8 | import java.lang.annotation.*
9 |
10 | @BindingAnnotation(BindShip.ShipBinderFactory)
11 | @Retention(RetentionPolicy.RUNTIME)
12 | @Target([ElementType.PARAMETER])
13 | public @interface BindShip {
14 |
15 | static class ShipBinderFactory implements BinderFactory {
16 | @Override
17 | Binder build(Annotation annotation) {
18 | { SQLStatement> q, BindShip bind, Ship arg ->
19 | q.bind "name", arg.name
20 | q.bind "allegiance", arg.allegiance
21 | q.bind "enteredService", arg.enteredService.value
22 | }
23 | }
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/starships/ImmutableCollectionContainerBuilder.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.starships
2 |
3 | import com.google.common.collect.ImmutableCollection
4 | import com.google.common.collect.ImmutableSet
5 | import groovy.transform.CompileStatic
6 | import org.skife.jdbi.v2.ContainerBuilder
7 |
8 | @CompileStatic
9 | class ImmutableCollectionContainerBuilder implements ContainerBuilder {
10 | private final ImmutableSet.Builder builder = new ImmutableSet.Builder()
11 |
12 | @Override
13 | ContainerBuilder add(Object it) {
14 | builder.add(it)
15 | return this
16 | }
17 |
18 | @Override
19 | ImmutableCollection build() {
20 | builder.build()
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/starships/ImmutableCollectionContainerBuilderFactory.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.starships
2 |
3 | import com.google.common.collect.ImmutableCollection
4 | import groovy.transform.CompileStatic
5 | import org.skife.jdbi.v2.ContainerBuilder
6 | import org.skife.jdbi.v2.tweak.ContainerFactory
7 |
8 | @CompileStatic
9 | class ImmutableCollectionContainerBuilderFactory implements ContainerFactory {
10 | @Override
11 | boolean accepts(Class> type) {
12 | true
13 | }
14 |
15 | @Override
16 | ContainerBuilder newContainerBuilderFor(Class> type) {
17 | new ImmutableCollectionContainerBuilder()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/starships/MemoryShipStore.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.starships
2 |
3 | import com.google.common.collect.ImmutableCollection
4 | import com.google.common.collect.ImmutableList
5 | import com.google.common.collect.ImmutableSet
6 | import groovy.transform.CompileStatic
7 |
8 | @CompileStatic
9 | class MemoryShipStore implements ShipStore {
10 |
11 | @Delegate
12 | private final List ships = []
13 |
14 | @Override
15 | void insert(Ship ship) {
16 | ships << ship
17 | }
18 |
19 | @Override
20 | ImmutableCollection list() {
21 | ImmutableSet.copyOf(ships)
22 | }
23 |
24 | @Override
25 | ImmutableCollection findByAllegiance(String allegiance) {
26 | ImmutableSet.copyOf ships.findAll { it.allegiance == allegiance }
27 | }
28 |
29 | @Override
30 | ImmutableCollection findByAllegianceNewestFirst(Object allegiance) {
31 | /*
32 | * NOTE: this implementation is deliberately faulty
33 | */
34 | ImmutableList.copyOf ships.sort { it.enteredService }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/starships/PersistentShipStore.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.starships
2 |
3 | import com.google.common.collect.ImmutableCollection
4 | import org.skife.jdbi.v2.sqlobject.Bind
5 | import org.skife.jdbi.v2.sqlobject.SqlQuery
6 | import org.skife.jdbi.v2.sqlobject.SqlUpdate
7 | import org.skife.jdbi.v2.sqlobject.customizers.Mapper
8 | import org.skife.jdbi.v2.sqlobject.customizers.RegisterContainerMapper
9 |
10 | interface PersistentShipStore extends ShipStore {
11 | @SqlUpdate("""create table ship (
12 | id int primary key auto_increment,
13 | name varchar(32),
14 | allegiance varchar(32),
15 | entered_service int
16 | )""")
17 | void createTable()
18 |
19 | @SqlUpdate("drop table ship")
20 | void dropTable()
21 |
22 | @SqlUpdate("insert into ship (name, allegiance, entered_service) values (:name, :allegiance, :enteredService)")
23 | @Override
24 | void insert(@BindShip Ship ship)
25 |
26 | @SqlQuery("select name, allegiance, entered_service from ship")
27 | @Mapper(ShipMapper)
28 | @RegisterContainerMapper(ImmutableCollectionContainerBuilderFactory)
29 | @Override
30 | ImmutableCollection list()
31 |
32 | @SqlQuery("select name, allegiance, entered_service from ship where allegiance = :allegiance")
33 | @Mapper(ShipMapper)
34 | @RegisterContainerMapper(ImmutableCollectionContainerBuilderFactory)
35 | @Override
36 | ImmutableCollection findByAllegiance(@Bind("allegiance") String allegiance)
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/starships/Ship.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.starships
2 |
3 | import java.time.Year
4 | import groovy.transform.CompileStatic
5 | import groovy.transform.EqualsAndHashCode
6 |
7 | @CompileStatic
8 | @EqualsAndHashCode
9 | class Ship {
10 | final String name
11 | final String allegiance
12 | final Year enteredService
13 |
14 | Ship(String name, String allegiance) {
15 | this(name, allegiance, Year.now())
16 | }
17 |
18 | Ship(String name, String allegiance, Year enteredService) {
19 | this.name = name
20 | this.allegiance = allegiance
21 | this.enteredService = enteredService
22 | }
23 |
24 | @Override
25 | String toString() {
26 | name
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/starships/ShipMapper.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.starships
2 |
3 | import groovy.transform.CompileStatic
4 | import org.skife.jdbi.v2.StatementContext
5 | import org.skife.jdbi.v2.tweak.ResultSetMapper
6 |
7 | import java.sql.ResultSet
8 | import java.time.Year
9 |
10 | @CompileStatic
11 | class ShipMapper implements ResultSetMapper {
12 | @Override
13 | Ship map(int index, ResultSet r, StatementContext ctx) {
14 | new Ship(r.getString("name"), r.getString("allegiance"), Year.of(r.getInt("entered_service")))
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/groovy/idiomaticspock/starships/ShipStore.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.starships
2 |
3 | import com.google.common.collect.ImmutableCollection
4 |
5 | interface ShipStore {
6 | void insert(Ship ship)
7 |
8 | ImmutableCollection list()
9 |
10 | ImmutableCollection findByAllegiance(String allegiance)
11 |
12 | ImmutableCollection findByAllegianceNewestFirst(Object allegiance)
13 | }
--------------------------------------------------------------------------------
/src/main/resources/test.txt:
--------------------------------------------------------------------------------
1 | this is some text
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/autocleanup/AutoCleanup1Spec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.autocleanup
2 |
3 | import idiomaticspock.starships.PersistentShipStore
4 | import org.skife.jdbi.v2.DBI
5 | import spock.lang.Specification
6 | import spock.lang.Subject
7 |
8 | class AutoCleanup1Spec extends Specification {
9 |
10 | def handle = DBI.open("jdbc:h2:mem:test")
11 | @Subject ships = handle.attach(PersistentShipStore)
12 |
13 | def setup() {
14 | ships.createTable()
15 | }
16 |
17 | def cleanup() {
18 | ships.dropTable()
19 | handle.close()
20 | }
21 |
22 | def "can retrieve a list of ships"() {
23 | given:
24 | def statement = handle.createStatement("insert into ship (name, allegiance) values (?, ?)")
25 | [Federation: ["Enterprise", "Constellation"], Klingon: ["M'Char"]].each { allegiance, names ->
26 | names.each { name ->
27 | statement.bind(0, name).bind(1, allegiance).execute()
28 | }
29 | }
30 |
31 | when:
32 | def ships = ships.findByAllegiance("Federation")
33 |
34 | then:
35 | with(ships.toList()) {
36 | size() == 2
37 | allegiance.every { it == "Federation" }
38 | name == ["Enterprise", "Constellation"]
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/autocleanup/AutoCleanup2Spec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.autocleanup
2 |
3 | import idiomaticspock.starships.PersistentShipStore
4 | import org.skife.jdbi.v2.DBI
5 | import spock.lang.AutoCleanup
6 | import spock.lang.Specification
7 | import spock.lang.Subject
8 |
9 | class AutoCleanup2Spec extends Specification {
10 |
11 | @AutoCleanup handle = DBI.open("jdbc:h2:mem:test")
12 |
13 | @AutoCleanup("dropTable")
14 | @Subject ships = handle.attach(PersistentShipStore)
15 |
16 | def setup() {
17 | ships.createTable()
18 | }
19 |
20 | def "can retrieve a list of ships"() {
21 | given:
22 | def statement = handle.createStatement("insert into ship (name, allegiance) values (?, ?)")
23 | [Federation: ["Enterprise", "Constellation"], Klingon: ["M'Char"]].each { allegiance, names ->
24 | names.each { name ->
25 | statement.bind(0, name).bind(1, allegiance).execute()
26 | }
27 | }
28 |
29 | when:
30 | def ships = ships.findByAllegiance("Federation")
31 |
32 | then:
33 | with(ships.toList()) {
34 | size() == 2
35 | allegiance.every { it == "Federation" }
36 | name == ["Enterprise", "Constellation"]
37 | }
38 | }
39 | }
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/autocleanup/AutoCleanup3Spec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.autocleanup
2 |
3 | import idiomaticspock.starships.PersistentShipStore
4 | import org.skife.jdbi.v2.DBI
5 | import spock.lang.AutoCleanup
6 | import spock.lang.Shared
7 | import spock.lang.Specification
8 | import spock.lang.Subject
9 |
10 | class AutoCleanup3Spec extends Specification {
11 |
12 | @Shared @AutoCleanup handle = DBI.open("jdbc:h2:mem:test")
13 |
14 | @Shared
15 | @AutoCleanup("dropTable")
16 | @Subject ships = handle.attach(PersistentShipStore)
17 |
18 | def setupSpec() {
19 | ships.createTable()
20 | }
21 |
22 | def "can retrieve a list of ships"() {
23 | given:
24 | def statement = handle.createStatement("insert into ship (name, allegiance) values (?, ?)")
25 | [Federation: ["Enterprise", "Constellation"], Klingon: ["M'Char"]].each { allegiance, names ->
26 | names.each { name ->
27 | statement.bind(0, name).bind(1, allegiance).execute()
28 | }
29 | }
30 |
31 | when:
32 | def ships = ships.findByAllegiance("Federation")
33 |
34 | then:
35 | with(ships.toList()) {
36 | size() == 2
37 | allegiance.every { it == "Federation" }
38 | name == ["Enterprise", "Constellation"]
39 | }
40 | }
41 | }
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/conditional/Network.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.conditional
2 |
3 | import groovy.transform.CompileStatic
4 | import groovy.transform.Memoized
5 |
6 | import static java.util.concurrent.TimeUnit.SECONDS
7 |
8 | @CompileStatic
9 | class Network {
10 | @Memoized
11 | static boolean isReachable(String url, int timeoutMillis = SECONDS.toMillis(1)) {
12 | try {
13 | def connection = url.toURL().openConnection()
14 | connection.connectTimeout = timeoutMillis
15 | connection.connect()
16 | true
17 | } catch (IOException ignored) {
18 | false
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/conditional/RequiresNetworkSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.conditional
2 |
3 | import spock.lang.IgnoreIf
4 | import spock.lang.Specification
5 |
6 | import static java.net.HttpURLConnection.HTTP_OK
7 |
8 | class RequiresNetworkSpec extends Specification {
9 |
10 | @IgnoreIf({ !Network.isReachable("http://httpbin.org/") })
11 | def "requires network 1"() {
12 | given:
13 | HttpURLConnection connection = "http://httpbin.org/".toURL().openConnection()
14 |
15 | when:
16 | connection.connect()
17 |
18 | then:
19 | connection.responseCode == HTTP_OK
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/datadriving/PrimaryKeySpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.datadriving
2 |
3 | import java.sql.Connection
4 | import spock.lang.AutoCleanup
5 | import spock.lang.Shared
6 | import spock.lang.Specification
7 | import spock.lang.Unroll
8 | import org.skife.jdbi.v2.DBI
9 | import org.skife.jdbi.v2.Handle
10 |
11 | class PrimaryKeySpec extends Specification {
12 | @Shared @AutoCleanup Handle handle
13 | @Shared Collection tableNames = []
14 |
15 | def setupSpec() {
16 | handle = DBI.open("jdbc:h2:mem:test")
17 | createTables()
18 |
19 | handle.connection.with { connection ->
20 | def rs = connection.metaData.getTables(null, null, "%", ["TABLE"] as String[])
21 | while (rs.next()) {
22 | tableNames << rs.getString(3)
23 | }
24 | }
25 | }
26 |
27 | def cleanupSpec() {
28 | dropTables()
29 | }
30 |
31 | @Unroll
32 | def "the #table table has a primary key"() {
33 | expect:
34 | with(handle.connection) { Connection connection ->
35 | connection.metaData.getPrimaryKeys(null, null, table).next()
36 | }
37 |
38 | where:
39 | table << tableNames
40 | }
41 |
42 | private void createTables() {
43 | ["foo", "bar", "baz"].each {
44 | handle.createStatement("create table $it (id char(32) primary key, name varchar(255))")
45 | .execute()
46 | }
47 | }
48 |
49 | private void dropTables() {
50 | tableNames.each {
51 | handle.createStatement("drop table $it").execute()
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/descriptioninunroll/DescriptionInUnrollSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.descriptioninunroll
2 |
3 | import spock.lang.Specification
4 | import spock.lang.Unroll
5 |
6 | @Unroll
7 | class DescriptionInUnrollSpec extends Specification {
8 | def "can tell if the string '#string' is an integer or not"() {
9 | expect:
10 | string.isInteger() == shouldBeInteger
11 |
12 | where:
13 | string | shouldBeInteger
14 | "ABC" | false
15 | "123" | true
16 | "1.2" | false
17 | "1 2" | false
18 | "1a2" | false
19 | }
20 |
21 | def "the string '#string' is #description"() {
22 | expect:
23 | string.isInteger() == shouldBeInteger
24 |
25 | where:
26 | string | shouldBeInteger
27 | "ABC" | false
28 | "123" | true
29 | "1.2" | false
30 | "1 2" | false
31 | "12a" | false
32 |
33 | description = shouldBeInteger ? "an integer" : "not an integer"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/doublepipes/DoublePipeWhereBlockSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.doublepipes
2 |
3 | import com.google.common.base.CaseFormat
4 | import groovy.transform.CompileStatic
5 | import spock.lang.Specification
6 | import spock.lang.Unroll
7 | import spock.util.mop.Use
8 |
9 | import static com.google.common.base.CaseFormat.LOWER_HYPHEN as KEBAB
10 | import static com.google.common.base.CaseFormat.LOWER_UNDERSCORE as SNAKE
11 | import static com.google.common.base.CaseFormat.UPPER_CAMEL as CAMEL
12 | import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE
13 |
14 | @Use(StringStyleCategory)
15 | class DoublePipeWhereBlockSpec extends Specification {
16 |
17 | @Unroll("converts '#string' to '#expected' using #style")
18 | def "can convert case"() {
19 | expect:
20 | string.convert(style) == expected
21 |
22 | where:
23 | string | style || expected
24 | "foo bar baz" | CAMEL || "FooBarBaz"
25 | "foo bar baz" | KEBAB || "foo-bar-baz"
26 | "foo bar baz" | SNAKE || "foo_bar_baz"
27 | }
28 |
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/failfast/FailFastSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.failfast
2 |
3 | import spock.lang.Ignore
4 | import spock.lang.Specification
5 | import spock.lang.Unroll
6 |
7 | @Ignore("this test shows the difference in diagnostics quality between using a loop and a where block")
8 | class FailFastSpec extends Specification {
9 |
10 | def "can identify numeric strings"() {
11 | expect:
12 | ["1", "-1", "1.1", "0xf", "0E+7"].every {
13 | it.isNumber()
14 | }
15 | }
16 |
17 | @Unroll
18 | def "'#n' is numeric"() {
19 | expect:
20 | n.isNumber()
21 |
22 | where:
23 | n << ["1", "-1", "1.1", "0xf", "0E+7"]
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/falsemonicker/FalseMonikerSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.falsemonicker
2 |
3 | import idiomaticspock.starships.MemoryShipStore
4 | import idiomaticspock.starships.Ship
5 | import spock.lang.Ignore
6 | import spock.lang.See
7 | import spock.lang.Specification
8 | import spock.lang.Subject
9 |
10 | import java.time.Year
11 |
12 | @See("http://stateyourbizness.blogspot.com/2008/07/good-unit-testing-practice.html")
13 | class FalseMonikerSpec extends Specification {
14 |
15 | @Subject def ships = new MemoryShipStore()
16 |
17 | def "can find ships by allegiance ordered by age v1"() {
18 | given:
19 | ships <<
20 | new Ship("Enterprise", "Federation", Year.of(2245)) <<
21 | new Ship("Adventure", "Federation", Year.of(2376)) <<
22 | new Ship("Haakona", "Romulan", Year.of(2357))
23 |
24 | expect:
25 | def matches = ships.findByAllegianceNewestFirst("Federation")
26 | matches.name == ["Enterprise", "Haakona", "Adventure"]
27 | }
28 |
29 | @Ignore("The previous test passes as it doesn't test the behavior properly. This is an example of a better way to implement it")
30 | def "can find ships by allegiance ordered by age v2"() {
31 | given:
32 | ships <<
33 | new Ship("Enterprise", "Federation", Year.of(2245)) <<
34 | new Ship("Adventure", "Federation", Year.of(2376)) <<
35 | new Ship("Haakona", "Romulan", Year.of(2357))
36 |
37 | expect:
38 | def matches = ships.findByAllegianceNewestFirst("Federation")
39 | matches.allegiance.every { it == "Federation" }
40 | matches.enteredService == matches.enteredService.sort().reverse()
41 | }
42 | }
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/functionalstyle/EverySpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.functionalstyle
2 |
3 | import idiomaticspock.starships.MemoryShipStore
4 | import idiomaticspock.starships.Ship
5 | import spock.lang.Specification
6 | import spock.lang.Subject
7 |
8 | class EverySpec extends Specification {
9 | @Subject
10 | def ships = new MemoryShipStore()
11 |
12 | def setup() {
13 | ships << new Ship("Gr'oth", "Klingon")
14 | ships << new Ship("Enterprise", "Federation")
15 | ships << new Ship("Constitution", "Federation")
16 | ships << new Ship("Constellation", "Federation")
17 | ships << new Ship("M'Char", "Klingon")
18 | ships << new Ship("Haakona", "Romulan")
19 | }
20 |
21 | def "can find ships by allegiance (v1)"() {
22 | when:
23 | def results = ships.findByAllegiance("Federation")
24 |
25 | then:
26 | results.size() == 3
27 | results[0].allegiance == "Federation"
28 | results[1].allegiance == "Federation"
29 | results[2].allegiance == "Federation"
30 | }
31 |
32 | def "can find ships by allegiance (v2)"() {
33 | when:
34 | def results = ships.findByAllegiance("Federation")
35 |
36 | then:
37 | results.every {
38 | it.allegiance == "Federation"
39 | }
40 | }
41 |
42 | def "can find ships by allegiance (v3)"() {
43 | when:
44 | def results = ships.findByAllegiance("Federation")
45 |
46 | then:
47 | results.allegiance.every {
48 | it == "Federation"
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/helpermethods/HelperMethodsAfterSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.helpermethods
2 |
3 | import spock.lang.Specification
4 |
5 | class HelperMethodsAfterSpec extends Specification {
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/helpermethods/HelperMethodsBeforeSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.helpermethods
2 |
3 | import spock.lang.Specification
4 |
5 | class HelperMethodsBeforeSpec extends Specification {
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/helpermethods/traits/ShipStoreHelpers.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.helpermethods.traits
2 |
3 | import groovy.transform.CompileStatic
4 | import idiomaticspock.starships.Ship
5 | import idiomaticspock.starships.ShipStore
6 |
7 | import java.time.Year
8 |
9 | @CompileStatic
10 | trait ShipStoreHelpers {
11 | abstract ShipStore getShips()
12 |
13 | void withShip(String name, String allegiance) {
14 | ships.insert new Ship(name, allegiance)
15 | }
16 |
17 | void withShip(String name, String allegiance, Year enteredService) {
18 | ships.insert new Ship(name, allegiance, enteredService)
19 | }
20 |
21 | int countByAllegiance(String allegiance) {
22 | ships.findByAllegiance(allegiance).size()
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/helpermethods/traits/TraitCompositionSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.helpermethods.traits
2 |
3 | import idiomaticspock.starships.MemoryShipStore
4 | import idiomaticspock.starships.ShipStore
5 | import spock.lang.Specification
6 | import spock.lang.Subject
7 |
8 | class TraitCompositionSpec extends Specification implements ShipStoreHelpers {
9 |
10 | @Subject ShipStore ships = new MemoryShipStore()
11 |
12 | def "can read back ships after inserting them"() {
13 | given:
14 | withShip "Enterprise", "Federation"
15 | withShip "Haakona", "Romulan"
16 |
17 | expect:
18 | countByAllegiance("Federation") == 1
19 | countByAllegiance("Romulan") == 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/nashorn/FriendlyDateSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.nashorn
2 |
3 | import spock.lang.*
4 |
5 | import javax.script.ScriptEngineManager
6 |
7 | import static java.time.LocalDateTime.now
8 |
9 | @IgnoreIf({ !new ScriptEngineManager().getEngineByName("nashorn") })
10 | class FriendlyDateSpec extends Specification {
11 | @Shared engine = new ScriptEngineManager().getEngineByName("nashorn")
12 | @Shared @Subject moment
13 |
14 | def setupSpec() {
15 | getClass().getResourceAsStream("/moment-with-langs.js").withReader { reader ->
16 | engine.eval reader
17 | }
18 |
19 | moment = engine.invokeFunction("moment")
20 | }
21 |
22 | @Unroll
23 | def "The date #date in friendly format is #expectedResult"() {
24 | expect:
25 | engine.invokeMethod(moment, "from", date.toString()) == expectedResult
26 |
27 | where:
28 | date | expectedResult
29 | now().plusDays(2) | "2 days ago"
30 | now().plusMinutes(2) | "2 minutes ago"
31 | now() | "a few seconds ago"
32 | now().minusDays(1) | "in a day"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/old/OldSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.old
2 |
3 | import spock.lang.Specification
4 | import spock.lang.Subject
5 |
6 | class OldSpec extends Specification {
7 |
8 | @Subject stack = new Stack()
9 |
10 | def "size increases when we add items to a stack v1"() {
11 | when:
12 | stack.push "foo"
13 |
14 | then:
15 | stack.size() == 1
16 | }
17 |
18 | def "size increases when we add items to a stack v2"() {
19 | given:
20 | def oldSize = stack.size()
21 |
22 | when:
23 | stack.push "foo"
24 |
25 | then:
26 | stack.size() == oldSize + 1
27 | }
28 |
29 | def "size increases when we add items to a stack v3"() {
30 | when:
31 | stack.push "foo"
32 |
33 | then:
34 | stack.size() == old(stack.size()) + 1
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/rules/CopySpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.rules
2 |
3 | import org.junit.Rule
4 | import org.junit.rules.TemporaryFolder
5 | import spock.lang.Specification
6 |
7 | class CopySpec extends Specification {
8 |
9 | @Rule TemporaryFolder temporaryFolder = new TemporaryFolder()
10 |
11 | def "can copy a resource from classpath to a file"() {
12 | given:
13 | def resource = getClass().getResource("/test.txt")
14 | def file = temporaryFolder.newFile()
15 |
16 | when:
17 | resource.withReader { file << it }
18 |
19 | then:
20 | file.text == resource.text
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/separatedatafromlogic/SeparateDataFromLogicSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.separatedatafromlogic
2 |
3 | import com.google.common.base.Function
4 | import rx.Observable
5 | import spock.lang.Specification
6 | import spock.lang.Subject
7 |
8 | class SeparateDataFromLogicSpec extends Specification {
9 |
10 | @Subject
11 | def service = new StreamService()
12 |
13 | def "passes data from stream to callback 1"() {
14 | given:
15 | def callback = Mock(Function)
16 |
17 | and:
18 | service.source = Stub(StreamSource) {
19 | connect() >> Observable.from("foo", "bar", "baz")
20 | }
21 |
22 | when:
23 | service.readStream(callback)
24 |
25 | then:
26 | 1 * callback.apply("foo")
27 | 1 * callback.apply("bar")
28 | 1 * callback.apply("baz")
29 | }
30 |
31 | def "passes data from stream to callback 2"() {
32 | given:
33 | def callback = Mock(Function)
34 |
35 | and:
36 | service.source = Stub(StreamSource) {
37 | connect() >> Observable.from(*data)
38 | }
39 |
40 | when:
41 | service.readStream(callback)
42 |
43 | then:
44 | data.each {
45 | 1 * callback.apply(it)
46 | }
47 |
48 | where:
49 | data = ["foo", "bar", "baz"]
50 | }
51 |
52 | }
53 |
54 | class StreamService {
55 | StreamSource source
56 |
57 | void readStream(Function callback) {
58 | source.connect().subscribe {
59 | callback.apply(it)
60 | }
61 | }
62 | }
63 |
64 | interface StreamSource {
65 | def Observable connect()
66 | }
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/stepwise/StackSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.stepwise
2 |
3 | import spock.lang.Shared
4 | import spock.lang.Specification
5 | import spock.lang.Stepwise
6 | import spock.lang.Subject
7 |
8 | @Stepwise
9 | class StackSpec extends Specification {
10 |
11 | @Shared @Subject stack = new Stack()
12 | @Shared value = "foo"
13 |
14 | def "can push to the stack"() {
15 | expect:
16 | stack.push(value) == value
17 | }
18 |
19 | def "stack should have content"() {
20 | expect:
21 | stack.peek() == value
22 | }
23 |
24 | def "can pop from the stack"() {
25 | expect:
26 | stack.pop() == value
27 | }
28 |
29 | def "the stack should be empty"() {
30 | expect:
31 | stack.empty()
32 | }
33 |
34 | def "trying to pop again raises an error"() {
35 | when:
36 | stack.pop()
37 |
38 | then:
39 | thrown EmptyStackException
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/tautological/TautologicalSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.tautological
2 |
3 | import java.time.Year
4 | import spock.lang.AutoCleanup
5 | import spock.lang.Specification
6 | import spock.lang.Subject
7 | import idiomaticspock.starships.PersistentShipStore
8 | import idiomaticspock.starships.Ship
9 | import idiomaticspock.starships.ShipMapper
10 | import org.skife.jdbi.v2.DBI
11 | import org.skife.jdbi.v2.Handle
12 |
13 | class TautologicalSpec extends Specification {
14 |
15 | @Subject PersistentShipStore ships
16 | @AutoCleanup Handle handle
17 |
18 | def setup() {
19 | handle = DBI.open("jdbc:h2:mem:test")
20 | ships = handle.attach(PersistentShipStore)
21 | ships.createTable()
22 | }
23 |
24 | def cleanup() {
25 | ships.dropTable()
26 | }
27 |
28 | def "can find ships by allegiance"() {
29 | given:
30 | ships.insert new Ship("Enterprise", "Federation", Year.of(2245))
31 | ships.insert new Ship("Adventure", "Federation", Year.of(2376))
32 | ships.insert new Ship("Haakona", "Romulan", Year.of(2357))
33 |
34 | expect:
35 | ships.findByAllegiance("Federation") == handle.createQuery("""\
36 | select * from ship
37 | where allegiance = 'Federation'\
38 | """)
39 | .map(new ShipMapper())
40 | .list() as Set
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/tck/MemoryShipStoreSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.tck
2 |
3 | import idiomaticspock.starships.MemoryShipStore
4 |
5 | class MemoryShipStoreSpec extends ShipStoreSpec {
6 | def setup() {
7 | ships = new MemoryShipStore()
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/tck/PersistentShipStoreSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.tck
2 |
3 | import idiomaticspock.starships.PersistentShipStore
4 | import org.skife.jdbi.v2.DBI
5 | import org.skife.jdbi.v2.Handle
6 | import spock.lang.AutoCleanup
7 |
8 | class PersistentShipStoreSpec extends ShipStoreSpec {
9 |
10 | @AutoCleanup Handle handle
11 |
12 | def setup() {
13 | handle = DBI.open("jdbc:h2:mem:test")
14 | ships = handle.attach(PersistentShipStore)
15 | ships.createTable()
16 | }
17 |
18 | def cleanup() {
19 | ships.dropTable()
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/tck/ShipStoreSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.tck
2 |
3 | import idiomaticspock.starships.Ship
4 | import idiomaticspock.starships.ShipStore
5 | import spock.lang.Specification
6 | import spock.lang.Subject
7 |
8 | import java.time.Year
9 |
10 | abstract class ShipStoreSpec extends Specification {
11 |
12 | @Subject T ships
13 |
14 | def "can insert a new ship"() {
15 | when:
16 | ships.insert(new Ship("Enterprise", "Federation", Year.of(2245)))
17 |
18 | then:
19 | ships.list().size() == old(ships.list().size()) + 1
20 | }
21 |
22 | def "can find ships by allegiance"() {
23 | given:
24 | ships.insert(new Ship("Enterprise", "Federation"))
25 | ships.insert(new Ship("Gr'oth", "Klingon"))
26 | ships.insert(new Ship("Constellation", "Federation"))
27 |
28 | when:
29 | def results = ships.findByAllegiance("Federation")
30 |
31 | then:
32 | results.size() == 2
33 | results.every { it.allegiance == "Federation" }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/test/groovy/idiomaticspock/whenthenwhenthen/RunOnSpec.groovy:
--------------------------------------------------------------------------------
1 | package idiomaticspock.whenthenwhenthen
2 |
3 | import spock.lang.Specification
4 |
5 | class RunOnSpec extends Specification {
6 |
7 | def "can use multiple when and then blocks"() {
8 | given:
9 | def stack = new Stack()
10 |
11 | when:
12 | stack.push "foo"
13 |
14 | then:
15 | stack.pop() == "foo"
16 |
17 | expect:
18 | stack.empty()
19 |
20 | when:
21 | stack.pop()
22 |
23 | then:
24 | thrown EmptyStackException
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------