Slide 1

Slide 1 text

you an existing library (the horse is probably your ego)

Slide 2

Slide 2 text

you your ideal library

Slide 3

Slide 3 text

language ✘ app framework ✘ test framework ✔

Slide 4

Slide 4 text

test/unit rspec cucumber

Slide 5

Slide 5 text

before / setup test ... should ... it ... after / teardown

Slide 6

Slide 6 text

blah = Hubris.new do before do @x = 1 end it “works” do raise unless 1 == @x end after do @x = nil end end blah.run

Slide 7

Slide 7 text

class Hubris def initialize(&block) instance_eval(&block) end def before(&block) @before = block end def it(name, &block) @test = block end # etc ... def run instance_eval(&@before) instance_eval(&@test) instance_eval(&@after) end end stash evaluate evaluate

Slide 8

Slide 8 text

before / setup test ... should ... it ... after / teardown @f = File.new @f.unlink @f.read

Slide 9

Slide 9 text

subcontexts: parent & child def run_befores @parent.run_befores if @parent instance_eval(&@before) end def run run_befores instance_eval(&@test) # etc ... end

Slide 10

Slide 10 text

Hubris.new do def some_method @x = 1 end it “works” do raise unless 1 == some_method end end where does this method live?

Slide 11

Slide 11 text

all of this has happened before; and it will all happen again.

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

AXIS OF WTF

Slide 14

Slide 14 text

it’s probably OK.

Slide 15

Slide 15 text

except maybe it’s not OK?

Slide 16

Slide 16 text

maybe don’t write anything.

Slide 17

Slide 17 text

maybe become a contributer.

Slide 18

Slide 18 text

open source responsibility.

Slide 19

Slide 19 text

give some context.

Slide 20

Slide 20 text

kill-ish your darlings. bit.ly/rubytesting