bugs.ruby-lang.org

TL;DR Under certain circumstances, dynamically defined symbols may break keyword arguments in Ruby 2.2. This was fixed in Ruby...

makandra dev
yoyo.io

Fontawesome 4 ships with many useful CSS helper classes. Enlarge Icon Add fa-lg (133%), fa-2x, fa-3x, fa...

When ending a Selenium test Capybara resets the browser state by closing the tab, clearing cookies, localStorage, etc.

makandra dev
relishapp.com

RSpec 3 has verifying doubles. This breed of mock objects check that any methods being stubbed are present on an...

If you need to log to a file you can use Ruby's Logger class: require 'logger'

github.com

You can hook into Slack when using Capistrano for deployment. The slackistrano gem does most of the heavy lifting for...

This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process...

makandra dev
github.com

Geordi 1.0 features a command line application geordi, that holds most of Geordi's previous commands. New features

Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...

When navigating back to a page that was received from a POST request, undesired side effects may happen. Therefore, modern...

Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...

When testing code that uses pushState / replaceState, your browser will appear to navigate away from http://localhost:3000/specs (or wherever...

Run bundle update cucumber capybara cucumber-rails to update to the newest versions. Backup your features/support/path.rb to be able to...

This is a problem when using Selenium with Firefox. We recommend using ChromeDriver for your Selenium tests. This setup allows...

github.com

Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...

Cucumber will clean up files you've uploaded in your Cucumber features automatically with the attached code. Put the file...

makandra dev

RSpec::Matchers.define :be_naturally_sorted do match do |array| array == array.natural_sort end end See RSpec: Where to put custom...

This step will pass if the specified select is sorted. Then /^the "(.*?)" select should be sorted$/ do |label, negate|

The benefit of the Rails asset pipeline is that it compiles your stylesheets and javascripts to a single file, respectively...

Option 0: Download from the official page (preferred) Open https://googlechromelabs.github.io/chrome-for-testing/ In Section "Stable" > chromedriver / linux64 > Download ZIP from...

Starting Terminator with split screens is quite simple: Just store a layout and start Terminator with the --layout option.

tutorialzine.com

A very clever hack to parse a structured URL object is to create a element and set its href to...

makandracards.com

This is a problem when using Selenium with Firefox. We recommend using ChromeDriver for your Selenium tests. Firefox will not...

github.com

Using this gem I could get JSON generation from a large, nested Ruby hash down from 200ms to 2ms.