~/talk

Secrets of Testing Rails 5 Apps

Talkat RedDotRubyConf 2016 · 2016-06-23..06-24· [ruby-on-rails, testing]
links:none on file
slides:none on file

Rails 5 replaces rake test with bin/rails test, shipping a Minitest-based test runner and custom reporter that adds colored output, fail‑fast, rerun‑failed, run‑by‑line and deferred output without extra gems. Controller specs now default to integration tests, which the talk claims run as fast as functional tests, so middleware, session and headers must be set via real requests and keyword args (params:, session:, headers:). assigns/assert_template are deprecated, API-only helpers auto-set JSON headers, and tests run in random order by default.

AI-written summary · about

  1. 0:00Intro
  2. 2:52Secrets of Testing Rails 5 apps
  3. 3:09Delete tests
  4. 4:46Running tests without batteries
  5. 7:09Writing tests
  6. 7:20Unit tests Functional tests Integration tests
  7. 7:55What do we test in a controller test
  8. 9:19Controller tests are easy
  9. 9:47Controller tests actually lie
  10. 11:31Almost same as controller test
  11. 12:41Integration controller tests are default in Rails 5
  12. 13:00Functional controller tests are soft deprecated
  13. 13:50Implications
  14. 16:27Black Box
  15. 16:48What not to test in integration style controller tests?
  16. 17:01Don't test controller internals
  17. 19:22Not just testing controller action in isolation
  18. 19:48Controller View interface
  19. 21:29Testing controller isolated from views
  20. 22:10HTTP Request methods
  21. 22:43Positional arguments
  22. 23:56Keyword arguments
  23. 25:24Testing API requests
  24. 27:22Active Job Async adapter
  25. 28:15Random test ordering
  26. 29:13Test Runner
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.