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

Why I use Guard

Why I use Guard

Lightning Talk given at Melbourne Ruby Meetup on 25 July, 2016

Keith Pitty

May 26, 2016
Tweet

More Decks by Keith Pitty

Other Decks in Programming

Transcript

  1. WHY I USE GUARD KEITH PITTY

  2. None
  3. WHY?

  4. None
  5. FAST AUTOMATIC FEEDBACK

  6. FIN!

  7. None
  8. None
  9. OH, OK …

  10. None
  11. HOW?

  12. guard-rspec

  13. REMEMBER AUTOTEST?

  14. GuardFile

  15. guard :rspec, cmd: 'zeus rspec' do watch('spec/spec_helper.rb') { "spec" }

    watch(%r{^spec/.+_spec\.rb$}) watch(%r{^app/(.+)\.rb$}) { |m| "spec/ #{m[1]_spec.rb" } # etc. end
  16. guard :rspec, cmd: 'zeus rspec'

  17. None
  18. None
  19. None
  20. < 1 SECOND

  21. None
  22. GuardFile

  23. CURATION

  24. watch('app/views/feeds/facebook/_encoded_content.erb') { "spec/controllers/feeds/facebook_controller_spec.rb" }

  25. WHEN A FILE CHANGES …

  26. AFFECTED TESTS RUN AUTOMATICALLY

  27. None
  28. FOCUS

  29. SPECIFIC TEST

  30. it "does what it should" do, focus: true # expect

    something end
  31. None
  32. FIRST 10 FAILED SPECS

  33. guard :rspec, cmd: 'zeus rspec', failed_mode: :focus do # etc.

    end
  34. guard-rspec

  35. FAST AUTOMATIC FEEDBACK

  36. None
  37. ALSO …

  38. guard-teaspoon

  39. guard-livereload

  40. guard-bundler

  41. guard-ctags-bundler

  42. AUTOMATION

  43. None
  44. NEXT?

  45. None
  46. guard-rubocop

  47. WHY DO I USE GUARD?

  48. FAST AUTOMATIC FEEDBACK

  49. UNDERSTAND NOW?

  50. None
  51. None
  52. THANK YOU!

  53. @keithpitty