alfajango.com

We can now plug into every facet of the Rails jQuery UJS adapter, binding to custom events, and even customizing...

httpd.apache.org

If you want to have a new log file every day automatically, but avoid using logrotate, the CustomLog directive is...

ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...

blog.plataformatec.com.br

It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let...

If you want to manually check if e-mail delivery works on a machine by sending an e-mail you...

When you write a custom RSpec matcher a good place to store them is to create one file per matcher...

To test whether a hash includes an expected sub-hash: expect(user.attributes).to match(hash_including('name' => 'Bruce Wayne'))

Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2

We are maintaining some vintage projects with tests written in Test::Unit instead of RSpec. Mocks and stubs are not...

You will occasionally need to clean out your database while keeping the schema intact, e.g. when someone inserted data in...

When you click a link or a press a button on a Selenium-controlled browser, the call will return control...

github.com

Adds a slide out panel to your Rails application that directs clients to test stories that have been marked as...

api.jquery.com

jQuery offers many different methods to move a selection through the DOM tree. These are the most important: $element.find(selector...

So you are comparing two Time objects in an RSpec example, and they are not equal, although they look equal...

rhnh.net

In order to cover some edge cases you rarely care about, Range#include? will become very slow in Ruby 1.9...

If you have content inside a page that is hidden by CSS, the following will work with Selenium, but not...

blog.plataformatec.com.br

A while ago we were working on an application that had an entire version specially created for mobiles, such as...

Note: For PostgreSQL you should use advisory locks. For MySQL we still recommend the solution in this card.

To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11...

This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...

babushka.me

The idea is this: you take a job that you'd rather not do manually, and describe it to babushka...

Then /^I should get a response with status (\d+)$/ do |status| response.status.should include(status) end Capybara Then /^I should...

This card describes a Cucumber step that lets you say: When I perform basic authentication as "username/password" and I visit...

You cannot use Array#join on an array of strings where some strings are html_safe and others are not...