tl;dr You can use ordered to ensure that messages are received in a specific order. Example expect(ClassA).to...
When you find similar groups of expect calls in your tests, you can improve readability by extracting the group into...
The sprintf method has a reference by name format option: sprintf("% d : % f", { :foo => 1, :bar => 2 }) # => 1 : 2.000000
Every modern Rails app should have a Content Security Policy enabled. Very compatible default The following "default" is a minimal...
While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic...
I recently stumbled over a problem that my feature tests broke in CI because of a mismatching chromedriver version.
Given you have an array column like this: create_table "users", force: :cascade do |t| t.integer "movie_ids", default: [], array...
View specs are a powerful tool to test several rendering paths by their cases instead of using a more costing...
The recommended additional setup of the spreewald gem, a useful set of cucumber steps, includes adding a file for defining...
We regularly have tasks that need to be performed around a deploy. Be it to notify operations about changed application...
Note Don't use reruns as a mean to work around flaky tests. You should always try to fix those...
Do you remember finding where a method is defined? I recently that Method objects are quite useful within a debugging...
Disclaimer This card is a collection of guides and things to have in mind when upgrading to a specific version...
Besides Plotting graphs in Ruby with Gruff, which comes handy for many uses cases, you sometimes might need configuration for...
Both knapsack and parallel_tests have the option to split groups by historic execution time. The required logs for this...
For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra...
The git doc states on the difference of these two commands: git-restore[1] is about restoring files in the...
Rails' url_for is useful for generating routes from a Hash, but can lead to an open redirect vulnerability.
Rails' Strong Parameters enable you to allow only specific values from request params to e.g. avoid mass assignment.
Rails offers several methods to manage three types of different cookies along with a session storage for cookies. These...
If you want to collapse/expand elements with dynamic content (and thus unknown height), you can not transition between height: 0...
Note: You won't need this for single lines of text. In this case it is better to just use...
Git log offers useful options for filtering. This card provides a short overview. By message Only commits that include a...
Sometimes you'll find yourself with a set of tasks that require similar code for different models. For example, if...