Slide 1

Slide 1 text

Jano González Developer A Little RSpec

Slide 2

Slide 2 text

code: https://github.com/janogonzalez/a-little-rspec

Slide 3

Slide 3 text

From testing to describing code

Slide 4

Slide 4 text

Describing Code

Slide 5

Slide 5 text

Describing Code

Slide 6

Slide 6 text

Describing Code • describe: The thing to describe • it: The expected behavior • should/should_not: The assertion

Slide 7

Slide 7 text

DRYing

Slide 8

Slide 8 text

DRYing

Slide 9

Slide 9 text

DRYing • before: Preparing the test case • after: Clean up • around: Mix before & after

Slide 10

Slide 10 text

A little more context

Slide 11

Slide 11 text

A little more context

Slide 12

Slide 12 text

A little more context • context

Slide 13

Slide 13 text

More DRYing

Slide 14

Slide 14 text

More DRYing

Slide 15

Slide 15 text

More DRYing • let • let!

Slide 16

Slide 16 text

More DRYing

Slide 17

Slide 17 text

More DRYing • implicit subject

Slide 18

Slide 18 text

More DRYing

Slide 19

Slide 19 text

More DRYing • implicit subject • it • its

Slide 20

Slide 20 text

More DRYing

Slide 21

Slide 21 text

More DRYing • explicit subject

Slide 22

Slide 22 text

More info

Slide 23

Slide 23 text

More info • @dchelimsky • The RSpec Book • @janogonzalez ;) • http://gemaroja.com ;)