Code is a load-bearing poem (and a pop-up newsletter) A program is a poem that you write for two audiences: The computer, and every programmer who comes after you.
A close read of the ActionDispatch::Response class This is a line-by-line investigation of the ActionDispatch::Response class, focused on understanding why each line is the way that it is – where (and when) did it come from, and what behaviors are any weird or complex lines enabling? If you came here trying to solve a problem related to
Using RSpec Feature Tests to Actually Test What You Think You're Testing Given the brittleness of RSpec's have_tag matcher and the presence of new Webrat and Capybara matchers that do a better job, have_tag was not included in rspec-rails-2.
A close read of the ActionDispatch::TestResponse class Last week [https://www.simplermachines.com/how-does-anyone-learn-to-test/] I talked about how I didn't know what an ActionDispatch::TestResponse [https://www.simplermachines.com/what-is-an-actiondispatch-testresponse-3/] was, or how and why it gets returned in tests instead of an ActionDispatch::Response. This week we'll figure that out with a close read of the
How does anyone learn to test? This week I got to the part of the "Learn Enough to Be Dangerous" Rails Tutorial [https://www.learnenough.com/ruby-on-rails-6th-edition] where you write a couple of tests for a static page controller. The test it asks you to write [https://github.com/njbennett/sample_app/blob/05b86be88192b5a670b29873929b8d0b8072e8d4/test/controllers/