RSpec's let allows you to super into "outside" definitions, in parent contexts. Example: describe '#save' do subject { described_class.new(attributes...

makandra dev

To ensure a consistent code style for JavaScript code, we use ESLint. The workflow is similar to integrating rubocop...

Sometimes we write plain SQL queries in migrations so we don't have to mock ActiveRecord classes. These two migrations...

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

github.com

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

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

dev.to

In my case [...] the catalog is an XML that contains all kinds of possible products, categories and vendors and it...

makandra dev

Field error steps Spreewald's The...

...field should have an error and The...

...field should have the error...

...steps now...

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

umaar.com

Similar to the Webpack Bundle Analyzer, Chrome's new Lighthouse feature … … shows a visualisation of your JavaScript bundles. It's...

From Exploring ES6: Module imports are hoisted (internally moved to the beginning of the current scope). Therefore, it doesn’t...

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

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.

You want to use fields in your applications. However, your desktop users may encounter some weird quirks: Aside from allowing...

Event delegation is a pattern where a container element has a single event listener that handles events for all descendants...

makandra dev

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

git --fixup is very handy to amend a change to a previous commit. You can then autosquash your commits with...

We are using Spring in our tests for sequential test execution but not for parallel test execution. And Rails requires...

It is generally discouraged to load your JavaScript by a tag in the : The reason is that a tag will pause the DOM parser until the script has loaded and executed. This will delay the browser's first contentful paint. A much better default is to load your scripts with a tag: A deferred script has many...

This bookmarklet grabs a PivotalTracker story title, transforms it into a valid git branch name and automatically prepends your initials...