makandra dev

When you call a method on an object, Ruby looks for the implementation of that method. It looks in the...

When you use a belongs_to or has_many macro you might be surprised that the methods that it generates...

Development environment setup Rails Composer Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server...

Usually, Cucumber feature files live in features/. When you group them in sub directories, make sure to add -r features...

Tests are about 100% control over UI interaction and your test scenario. Randomness makes writing tests hard. You will also...

I had to deal with JavaScript Undefined Error while accessing a specific CKEditor instance to fill in text. Ensure everything...

class Book::Page end class MyBook < Book def new_page Page.new # has to be `Book::Page` in development to...

Ask before leaving an unsaved CKEditor Vanilla JavaScript way, but removes any other onbeforeunload handlers: $(function(){ document.body.onbeforeunload = function() { for(editorName...

When you are working with Backbone models and inheritance, at some point you want to overwrite inherited methods but call...

relishapp.com

Sometimes you have a test expectation but actually want a better error message in case of a failure. Here is...

makandra dev
github.com

Put the attached file into features/support/. Example usage: When /^I open the task named "(.+?)"$/ do |task_name| task = page.all('.task...

blog.buildbettersoftware.com

Mornings can be rough. To make them a little easier, leave yourself a failing test if your work isn’t...

After I upgraded to Mac OS X Mavericks, I regularly got this error message when running Cucumber features with Selenium...

Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...

jacklmoore.com

Non-static elements will not inherit their parent's opacity in IE for no good reason. This can lead to...

dev.mysql.com

A MySQL DECIMAL column is used when it is important to preserve exact precision. It takes two parameters, where...

makandra dev

We have released Modularity 2. It has many incompatible changes. See below for a script to migrate your applications automatically...

If you want to test that a certain text is contained within the document title of your page, you can...

When you do something like this in your code: def var_value @var ||= some_expensive_calculation end

TLDR: This card explains which threads and processes interact with each other when you run a Selenium test with Capybara...

In Ruby, classes and modules are called constants. This card explains how Ruby resolves the meaning of a constant.

When you print something from within your .bashrc file you will run into trouble when copying something onto your machine...

github.com

# Attach a file # # Example: # # Company.new.logo = File.new… # # Given the file "…" was attached as logo to the company above # # # Example: # # class Gallery...

This error occurs when you already have a database.yml which defines the database for the cucumber environment instead of test...