Slide 1

Slide 1 text

An Introduction to Spies in RSpec

Slide 2

Slide 2 text

a!/samphippen

Slide 3

Slide 3 text

Feel free to ask Questions

Slide 4

Slide 4 text

Testing

Slide 5

Slide 5 text

We are the people that test the code

Slide 6

Slide 6 text

Why do we test our code?

Slide 7

Slide 7 text

x`

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Tests help us find bugs

Slide 10

Slide 10 text

and then never see them again

Slide 11

Slide 11 text

Some tests provide design feedback on our code

Slide 12

Slide 12 text

Kinds of test

Slide 13

Slide 13 text

Integrated test Fake nothing

Slide 14

Slide 14 text

Isolated test Fake everything

Slide 15

Slide 15 text

and a spectrum in between

Slide 16

Slide 16 text

Why do we fake things?

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Kinds of fake

Slide 19

Slide 19 text

Stub Fake a response to some method call

Slide 20

Slide 20 text

Mock Expect a method will be called in the future

Slide 21

Slide 21 text

Spy Record calls made and then assert after the fact

Slide 22

Slide 22 text

Let’s write some tests

Slide 23

Slide 23 text

x

Slide 24

Slide 24 text

Let’s have some questions !!/samphippen [email protected]

Slide 25

Slide 25 text

Feel free to ask Questions

Slide 26

Slide 26 text

RSpec RSpec ! ! RSpec 3

Slide 27

Slide 27 text

Let’s have some questions a!/samphippen [email protected]