If you already selected an element and want to get its parent, you can call find(:xpath, '..') on it.

If you use awesome and make a Slack call, you'll constantly have an overlay window pop up taking over...

github.com

When an Rspec example fails, I usually investigate by running that example again using rspec . However, this does not work...

You are not using javascript tests The file is served from a public folder (not via controller) Problem description...

makandra dev

An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...

When your public-facing application has a longer downtime for server maintenance or long migrations, it's nice to setup...

Browsers support different types of redirects. Be very careful with these status codes: 301 Moved Permanently 308 Permanent Redirect

Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...

If you are using PDFKit / wkhtmltopdf, you might as well want to use custom fonts in your stylesheets. Usually this...

makandra dev
inclusive-components.design

Hack to implement an inverted "night mode" theme with a few lines of CSS. Colors in images are preserved.

depfu.com

TL;DR: Bundler 2.0 will rename Gemfile to gems.rb and Gemfile.lock to gems.locked (sic). The old filenames will be supported...

When you want to group rails models of a logical context, namespaces are your friend. However, if you have a...

RSpec allows defining methods inside describe/context blocks which will only exist inside them. However, classes (or any constants, for that...

askubuntu.com

While the hardware mute button of my Lenovo x230 worked on Ubuntu 14.04 out of the box, it does not...

Let's say you have a form that you render a few times but you would like to customize your...

github.com

FactoryBot allows a :class option to its factory definitions, to set the class to construct. However, this option is not...

forums.linuxmint.com

On my Ubuntu MATE machine, switching applications with ALT + TAB was impossible, because it took nearly 2 seconds. The culprit...

docs.sentry.io

The linked documentation explains how to get a JSON list of the latest 100 events of a given issue. Simply...

There are several gems that make it easy to read and process xlsx files. Parsing the entire file at once...

When localizing model attributes via I18n you may run into errors like this: I18n::InvalidPluralizationData: translation data {...

...} can not be...

If another session is accessing your database you are trying to reset or drop you might have seen the following...

gist.github.com

Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...

docs.ruby-lang.org

Use return to return from a method. return accepts a value that will be the return value of the...

I frequently find myself needing a combination of group_by, count and sort for quick statistics. Here's a method...