tea-time/presentation/03_describe_and_it.slides

63 lines
1019 B
Plaintext

!SLIDE
# `describe`
!SLIDE
# Describes a thing or a behavior of a thing
!SLIDE
# Let's describe...
!SLIDE image-80-percent
<img src="assets/relevant-cat.jpg" />
!SLIDE even-larger
``` coffeescript
describe 'Cat', ->
# cat behavior descriptions go here
```
!SLIDE
# Something that cats do...
!SLIDE image-80-percent
<img src="assets/cat-meow.jpg" />
!SLIDE even-larger
``` coffeescript
describe 'Cat', ->
describe '#meow', ->
# description of the
# meow behavior goes here
```
!SLIDE larger
# John behavior #1
## Use Ruby-style indicators for instance- and class-level methods
``` coffeescript
describe 'John', ->
describe 'spec definitions', ->
it 'should look like you did it in RSpec', ->
```
!SLIDE
# Describe how we expect a cat to meow
!SLIDE
# `it`
!SLIDE even-larger
``` coffeescript
describe 'Cat', ->
describe '#meow', ->
it 'should meow correctly', ->
# expectation of a cat meowing
```
!SLIDE
# We have the description...
!SLIDE
# Now let's add the expectations!