makandra dev

If you're using the webdrivers gem and VCR together, depending on your configuration, VCR will yell at you regulary...

If you are trying to integrate VCR and Cucumber 4 and you're using the use_scenario_name: true option...

Here is an example with the --tags option. You need to wrap them inside --cucumber-options option of parallel_cucumber...

makandra dev

If you have a Ruby Pathname, you can use the method :/ to append filepaths to it. With this method, Ruby...

Ruby's File class has a handy method binary? which checks whether a file is a binary file. This method...

If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...

"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...

makandra dev
github.com

FactoryBot allows to create traits from Enums since version 6.0.0 The automatic definition of traits for Active Record enum attributes...

makandra dev

RubyMine has a HTTP Client that can be useful to test web APIs. Just create a .http scratch file an...

Select2 is a fantastic library for advanced dropdown boxes, but it depends on jQuery. Alternatives Tom Select

In a web application you sometimes have tasks that can not be processed during a request but need to go...

makandra dev
github.com

If you render markdown from user input, an attacker might be able to use this to inject javascript code into...

When an event listener on a DOM element throws an error, that error will be silenced and not interrupt your...

Running Cucumber tests while your cucumber.yml is 100% valid may still produce the following error. cucumber.yml was found, but could...

tl;dr Don't forget require 'English' if you use a named global such as $LAST_MATCH_INFO. Otherwise this...

betterspecs.org

betterspecs.org is a documentation on how to write better RSpec tests. Note that there are also other approaches like The...

makandra dev

With Rspec you can mock objects or functions, for example like this: expect(my_object).to receive(:my_function).and...

We use the whenever gem to automatically update the crontab of the servers we deploy to. By default, whenever will...

makandra dev
thoughtbot.com

One of the earliest pieces of wisdom we are given as programmers is to not write duplicate code: Don’t...

This seems to be obvious, but you can expect Rake tasks to be called in RSpec. it 'deletes all Users...

To make CSS rules dependent on the screen size, we use media queries: @media (max-width: 500px) { // rules for screen...

github.com

The linked GitHub repository is a bit like our "dev" cards deck, but groomed from a single person (Josh Branchaud...

With puma you can have concurrent requests. There are two concepts on how Puma can handle two incoming requests: Workers...

Test-Driven Development (TDD) in its most dogmatic form (red-green-refactor in micro-iterations) can be tedious. It does...