Skip to content

Commit

Permalink
Fixed some code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Feb 4, 2017
1 parent fd62ca7 commit 37c667f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/Assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ Sometimes you want to check a condition but only after other conditions are met.
```smalltalk
| code officiallyAssignedCodes |
code := 'AR'.
code := 'AA'.
officiallyAssignedCodes := #('AR' 'BR' 'US').
AssertionCheckerBuilder new
checking: [ :asserter |
asserter
enforce: [ code size = 2 and: [ code allSatisfy: #isLetter ]]
because: 'ISO 3166-1 Alpha-2 codes must have exactly two letters';
because: 'ISO 3166-1 Alpha-2 codes must have exactly two letters'
onSuccess: [ :sucessAsserter |
sucessAsserter
enforce: [ officiallyAssignedCodes includes: code ]
because: [ '<1s> is not an officially assigned code' expandMacrosWith: code ]
];
]
];
buildAndCheck
```
Expand All @@ -106,12 +106,12 @@ AssertionCheckerBuilder new
checking: [ :asserter |
asserter
enforce: [ code size = 2 and: [ code allSatisfy: #isLetter ]]
because: 'ISO 3166-1 Alpha-2 codes must have exactly two letters';
because: 'ISO 3166-1 Alpha-2 codes must have exactly two letters'
onSuccess: [ :sucessAsserter |
sucessAsserter
refuse: [ unassignedCodes includes: code ]
because: [ '<1s> is an unassigned code' expandMacrosWith: code ]
];
]
];
buildAndCheck
```
Expand Down

0 comments on commit 37c667f

Please sign in to comment.