RSpec Rails can automatically mix in different behaviors to your tests based on their type tag, for example enabling you...
Since Rails 6.1, if we use where.not with multiple attributes, it applies logical NAND (NOT(A) OR NOT(B)) instead...
You can use RSpec::Matchers.define_negated_matcher to define a negated version of an existing matcher. This is particularly useful...
Jasmine has spyOnProperty(), but it only works if the property is implemented using getter and setter functions. This is a...
TL;DR When using Cache-Control on a Rails application, make sure the Vary: Accept header is set.
ImageMagick can convert SVGs to raster image formats. Example for PNG: convert input.svg output.png If the SVG has a...
The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served...
Some users might use Adblock Plus or similar browser plugins to reduce the number of ads displayed. If you run...
From Exploring ES6: Module imports are hoisted (internally moved to the beginning of the current scope). Therefore, it doesn’t...
Modern versions of Capybara include a finder method #ancestor which allows you to find a parental element using CSS or...
Since GitLab 10.3. you can use Mermaid in GitLab comments: Gitlab Doc. With Mermaid you can create diagrams based on...
Jasmine is a great way to unit test your JavaScript components without writing an expensive end-to-end test for...
A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...
If you want Sidekiq to be able to talk to Redis on staging and production servers, you need to add...
Basic validations Read the Rails Guide on ActiveRecord Validations. You should have an overview which kinds of validations are built...
Within development and test environments, Rails is usually configured to show a detailed debug page instead of 404s. However, there...
This RailsCast demonstrated a very convenient method to activate VCR for a spec by simply tagging it with :vcr.
RSpec is smart when using the include-matcher in combination with .not_to. One could assume that .not_to include...
Inspired by recent "git shortcut" cards I figured it would be nice to have one of these for rebasing a...
Event delegation is a pattern where a container element has a single event listener that handles events for all descendants...
Sometimes a link or input field has no visible label. E.g. a text field with a magnifying glass icon 🔎 and...
Besides their default styling properties, HTML elements have a semantic meaning. For example, an h1 tag is usually styled with...
Ruby lets you re-use existing RegExp objects by interpolating it into new patterns: locales_pattern = /de|en|fr|es/i...
The RSpec matcher tests if two HTML fragments are equivalent. Equivalency means: Whitespace is ignored Types of attribute quotes are...