This is a checklist I use to work on issues. For this purpose I extracted several cards related to the...
Not all email clients support external images in all situations, e.g. an image within a link. In some cases, a...
Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...
Rails includes milliseconds in Time / DateTime objects when rendering them as JSON: JSON.parse(User.last.to_json)['created_at'] #=> "2001-01-01...
Let's assume that we have a model Movie that registers a callback function when a new instance of Movie...
I recently enjoyed debugging a Cucumber step that tried to be retryable using a patiently block: Then /^"([^"]*)" should( not)? be...
Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...
In a Jasmine spec you want to spy on a function that is imported by the code under test. This...
We usually rely on VCR and WebMock to prevent any real network connection when running our unit tests.
Jasmine specs for the frontend often need some DOM elements to work with. Because creating them is such a common...
Jasmine specs that work with DOM elements often leave elements in the DOM after they're done. This will leak...
While in CSS zero is usually referenced without specifying a unit (e.g. padding: 0), you must not use a unitless...
sass >= 1.35.0 has the option quietDeps and silenceDeprecations to silence deprecation warnings from dependencies. quietDeps: No deprecation warnings for dependencies...
ActiveType::Object inherits from ActiveRecod::Base and is designed to behave like an ActiveRecord Object, just without the database...
Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...
You can use ETags to allow clients to use cached responses, if your application would send the same contents as...
Here are a few common patterns that will probably lead to flaky specs. If you notice them in your specs...
tl;dr In RubyMine you can use find and replace with capture groups (.*?) and backreferences $1 (if you have several...
Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name...
To allow HTTP 304 responses, Rails offers the fresh_when method for controllers. The most common way is to pass...
Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...
You can use the code below to check whether the browser can make connections to the current site: await isOnline...
When changing code in mailers, updating the corresponding mailer preview can be forgotten very easily. Mailer previews can be tested...
Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...