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...

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...

makandra dev

Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...

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...

We are consistently having trouble with selenium-webdriver > 2.5.0 where whenever we try to select an option from a Capybara...

Whenever Firefox updates, all your Cucumber features that use Selenium break. This is annoying. In order to remedy this, version...

Selenium does not speak SSL because it uses WEBrick that doesn't. When you use Selenium for Cucumber scenarios that...

When you don't know which options are available, but need to have an option selected, use this step.

There is a bug in Rails 3's dbconsole script, which makes the following command open a database console for...

github.com

Microsoft provides virtual machine disk images to facilitate website testing in multiple versions of IE, regardless of the host operating...

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:

Ever wondered how Rails talks to itself in a Cucumber feature? In Rails 3 you can do it like this...

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

Rails doesn't know which host it is running on. For generating links, it strips the hostname off the request...

Note that if you plan to downgrade Firefox because your Selenium tests broke after a Firefox upgrade, there is a...

Note that if you plan to freeze your Firefox versions because your Selenium tests break whenever Firefox updates, there is...

Sometimes the Rails helper #distance_of_time_in_words is using too much magic. When you need a time difference...

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

Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some...

makandra dev

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...

Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and...

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