Modern IRB has time measurement built in. measure # Enable measure :off # Disable Custom Should your version of IRB not offer...

To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11: actual_array.should =~ expected_array If either side is an ActiveRecord scope...

Cucumber_rails' old-school web-steps have been deprecated for a while, urging developers to write high-level step definitions...

If you want to sort values from an enumerable into two arrays based on whether they match a certain criteria...

shapeshed.com

I've recently moved from using Parallels for browser testing to Sun's Open Source VirtualBox. Here's a walkthrough on how to get a browser testing suite for free...

tl;dr: Upgrade the gem to at least 4.0.1 When you use rspec_rails in a version < 4 with Rails...

track down warnings and to see failing specs immediately or to get an overview of the core...

The following will search for all .feature files containing a search term and run them using geordi. find features/ -name...

Run rspec-and-cucumber from any project directory to run both RSpec and Cucumber. If available, rspec_spinner or cucumber...

You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to...

Chromedriver (or selenium-webdriver?) will not reliably scroll elements into view before clicking them, and actually not click the element...

You probably know about the possibility to tag scenarios in Cucumber to run your own piece of code before the...

makandra dev

The handy method has_select?(field, :selected => text) does not behave as expected with Cucumber 0.10.2, Capybara 0.4.1.2 and Selenium...

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

I've recently encountered a weird problem with specs making lots of SOLR queries using the acts_as_solr plugin...

CoffeeScript and JavaScript (ECMAScript) both have operators in and of. Each language use them for more than one purpose. There...

Sometimes when working with VCR you still want to use webmock. Since VCR hooks into webmock and fails when an...

makandra dev

Connect to your IMAP server. If you have SSL enabled: openssl s_client -connect your-server:993 if your server...

When running Selenium features with parallel_tests, some browser-server interaction might take longer than usual and the impatient Capybara will not wait enough to see results. Put the attached...

web.archive.org

With its you can switch the subject of an example to a method value of the current subject: describe Array...

To check if a method has been called in Jasmine, you first need to spy on it: let spy = spyOn...

stackoverflow.com

In some older Capybara versions (e.g. 0.3.9), we're getting lots of deprecations warnings: Selenium::WebDriver::Element#select is deprecated...

Spreewald 1.3.0 comes with these steps: Then I should see an element ".panel" Then I should not see an element...

stackoverflow.com

The solution in this card is based on a stack overflow post by Leventix. If you need to make request...