Capybara will match elements outside of a page's tag. For example, the step definitions below match nodes in a...

github.com

Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...

When adding a new field to your model's database table, don't set any defaults in the database.

web.archive.org

Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...

dev.opera.com

Since version 11.10 Opera provides support for linear gradients using -o-linear-gradient. The syntax is pretty similar to Mozilla...

blog.bitcrowd.net

Recently, we had an interesting lunch-break with the rails 3.1. asset-pipeline in production mode. Daniel Zahn made a...

You can use the step definition below to say this: Then the "Last name" field should have an error

blog.bitcrowd.net

When cucumber encounters a failing step in a @javascript feature, the selenium browser window instantly closes. Sometimes you do not...

If Rails or Rake are complaining about a missing gem that is listed in your Gemfile.lock and the listed version...

css-tricks.com

Good guide to different ways you can write CSS selectors that select elements by their attribute values.

Consider you have a website vhost listening to www.example.com, redirecting all incoming requests that do not talk about the configured...

stackoverflow.com

These methods are available to you: page.driver.browser.switch_to.alert.accept page.driver.browser.switch_to.alert.dismiss page.driver.browser.switch_to.alert.text # the confirmation text Spreewald gives you steps like these:

Simple: Tell the application controller how to handle exceptions, here a RecordNotFound error. Do this with the following line: # application_controller.rb...

Do you have page caching enabled for the development environment and there are cached pages lying around in public/?

While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals...

I recently browsed through the ActiveSupport code and found some nice stuff I did not know about: ActiveSupport::Callbacks

Consider this HTML: Even though the surrounding container defines a line-height, which vertically centers its inline elements, the check...

We have a big flat screen TV (Samsung LE46c650l1kxxu) in our conference room. Configuring it properly, we were encountering some...

Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...

To avoid sending e-mails containing sensitive data unencrypted I strongly suggest you enable a confirmation dialog. Enigmail can show...

The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...

tl;dr: Always have your attachment path start with :rails_root/storage/#{Rails.env}#{ENV['RAILS_TEST_NUMBER']}/. The directory where you...

When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...

Select as many rows as you'd like to insert by dragging over the row numbers on the left. Then...