While verifying doubles in RSpec is a good default, it is limited in the amount of methods it actually is...

Code quality can be measured in four levels: (Working code) Reliable code (minimum) Readable code (ok for short-lived code...

tl;dr You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details

When you need information about a gem (like version(s) or install path(s)), you can use the gem binary...

Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...

While we are used to run our JavaScript tests on a test page within our Browser, it's also possible...

We use foreman to start all necessary processes for an application, which are declared in a Procfile. This is very...

Building application assets with esbuild is the new way to do it, and it's great, especially in combination with...

Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...

github.com

When Capybara locates elements in the DOM, by default it allows only accessing visible elements -- when you are using a...

Jasmine is a great tool to unit test your JavaScript components without writing an expensive end-to-end test for...

Resources RubyGuides: Mastering Ruby Regular Expressions Using regular expressions in JavaScript Testing regular expressions visually Regular Expressions: Quantifier modes...

JavaScript code can access and manipulate the browser's DOM tree. Using JavaScript we can add interactive behavior to our...

TL;DR When using Cache-Control on a Rails application, make sure the Vary: Accept header is set.

makandra dev
github.com

Rack::SteadyETag is a Rack middleware that generates the same default ETag for responses that only differ in CSRF tokens...

The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served...

makandra dev
stackoverflow.com

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...

A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...

makandra Curriculum

Basic validations Read the Rails Guide on ActiveRecord Validations. You should have an overview which kinds of validations are built...

makandra dev
smashingmagazine.com

Debugging in CSS means figuring out what might be the problem when you have unexpected layout results. We’ll look...

makandra dev

Besides their default styling properties, HTML elements have a semantic meaning. For example, an h1 tag is usually styled with...

The RSpec matcher tests if two HTML fragments are equivalent. Equivalency means: Whitespace is ignored Types of attribute quotes are...

Rails has the handy controller method send_file which lets us download files easily. We can decide whether the file...