$30 off During Our Annual Pro Sale. View Details »

RSpec... Your doing it wrong... RoRoSYD Lightning Talk October 2013

Jon Rowe
October 08, 2013

RSpec... Your doing it wrong... RoRoSYD Lightning Talk October 2013

A not so subtle lighting talk from RoRoSyd.

Jon Rowe

October 08, 2013
Tweet

More Decks by Jon Rowe

Other Decks in Programming

Transcript

  1. rspec...
    youre
    doing it
    wrong...
    Tuesday, 8 October 13

    View Slide

  2. Tuesday, 8 October 13

    View Slide

  3. Tuesday, 8 October 13

    View Slide

  4. Tuesday, 8 October 13

    View Slide

  5. Tuesday, 8 October 13

    View Slide

  6. youre
    doing it wrong!
    Tuesday, 8 October 13

    View Slide

  7. • Don’t use it { should do_thing }
    • Don’t write describe Class do ... end
    • Do write actually descriptive text
    • Do use describe and context and nest
    • Do use your judgement
    Tuesday, 8 October 13

    View Slide

  8. Tuesday, 8 October 13

    View Slide

  9. youre
    doing it wrong!
    Tuesday, 8 October 13

    View Slide

  10. • Not. A. Unit. Test.
    • Why are you testing something that’s
    beyond your control?
    • What value is this giving you?
    • Where is this of most use anyway?
    • Find the best value for your code.
    Tuesday, 8 October 13

    View Slide

  11. Tuesday, 8 October 13

    View Slide

  12. youre
    doing it wrong!
    Tuesday, 8 October 13

    View Slide

  13. Tuesday, 8 October 13

    View Slide

  14. Tuesday, 8 October 13

    View Slide

  15. youre
    doing it wrong!
    Tuesday, 8 October 13

    View Slide

  16. Tuesday, 8 October 13

    View Slide

  17. • Asthetics are personal.
    • RSpec is meta.
    • RSpec is sugar.
    • RSpec is happyness.
    • Ruby is meta.
    • Ruby is sugar.
    • Ruby is happyness.
    Tuesday, 8 October 13

    View Slide

  18. Tuesday, 8 October 13

    View Slide

  19. youre
    doing it wrong!
    Tuesday, 8 October 13

    View Slide

  20. A theory
    is impossible to
    prove
    but
    Easy to disprove...
    Tuesday, 8 October 13

    View Slide

  21. Tuesday, 8 October 13

    View Slide

  22. Tuesday, 8 October 13

    View Slide

  23. Tuesday, 8 October 13

    View Slide

  24. thanks
    @jonrowe
    Tuesday, 8 October 13

    View Slide

  25. BONUS
    ROUND...
    Tuesday, 8 October 13

    View Slide

  26. Tuesday, 8 October 13

    View Slide

  27. youre
    doing it wrong!
    Tuesday, 8 October 13

    View Slide

  28. • Write more unit tests...
    • Write more specalised tests...
    • Don’t use rspec-rails
    • Do use Rails 4
    • Do consider the value of the tests
    Tuesday, 8 October 13

    View Slide