tea-time/presentation/03_describe_and_it.slides

63 lines
1019 B
Plaintext
Raw Permalink Normal View History

2012-03-13 17:29:42 +00:00
!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" />
2012-03-24 14:20:56 +00:00
!SLIDE even-larger
2012-03-13 17:29:42 +00:00
``` coffeescript
describe 'Cat', ->
describe '#meow', ->
2012-03-24 14:20:56 +00:00
# description of the
# meow behavior goes here
2012-03-13 17:29:42 +00:00
```
2012-03-24 14:20:56 +00:00
!SLIDE larger
2012-03-13 17:29:42 +00:00
# John behavior #1
2012-03-24 14:20:56 +00:00
## Use Ruby-style indicators for instance- and class-level methods
2012-03-13 17:29:42 +00:00
``` 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!