The step definition below allows you to write: Then I should see a link labeled "Foo" But I should not...

The step definitions below allow you to write this in both Webrat and Capybara: When I follow "Download as PDF...

Spreewald has steps that let you test that e-mails have been sent, using arbitrary conditions in any combination. The attached file is for legacy purposes only...

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

The step definition below allows you to write: Then I should see an HTML redirect to "http://www.makandracards.com" in the...

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

justinfrench.com

Eventually you’ll forget that you used to spend hours testing your code in a browser, and start complaining that your automated tests are taking minutes to run! You’ll...

...have intense debates with co-workers about what to test and how to test it properly. You’ll start writing the test first to expose the bug or missing feature...

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

To delay your entire Jasmine test suite until the DOM is ready, add the following: beforeAll(function(done) {

Don't say is_a?(ActiveRecord::NamedScope::Scope) because that is no longer true in Rails 3 and also doesn...

jasmine.github.io

The easiest way to freeze or travel through time in a Jasmine spec is to use the built-in jasmine.clock...

Safari & Chrome Use $x() in your console: $x('//span') # selects all span elements Firefox There's an add-on.

When you roll custom URLs with hacks like routing-filter, you can put a spec like this into spec/routing/routing_spec.rb:

blog.salsify.com

...problem of pending AJAX requests dying in the browser when the server ends a test or switches scenarios. We were able to work around this issue in most projects by...

makandra Operations

You can use wscat: sudo apt-get install node-ws # wscat -c ws://echo.websocket.org connected (press CTRL+C to quit...

Cucumber will clean up files you've uploaded in your Cucumber features automatically with the attached code. Put the file...

m.onkey.org

...go fixtureless with Shoulda + Factory Girl. All good, except one problem. Slow as fuck tests. So here’s fast_context as a solution for it. fast_context compiles all the...

...should’s within a context into a single test...

babushka.me

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

requestb.in

Requestb.in is a webservice that gives you a temporary URL you can use to test request. The page will automatically record and display the latest web request made to it...

makandra dev
brunildo.org

The pages listed here contain tests and experiments about features, possibilities, browsers’ bugs concerning CSS. That is, over 200 experiments...

willmore.eu

The linked site hosts a simple test. It shows two images with narrow vertical/horizontal lines. The more they resemble each other, the more Retina your display is...

makandra dev
filippo.io

Enter the hostname of a server to test it for CVE...

blog.buildbettersoftware.com

Mornings can be rough. To make them a little easier, leave yourself a failing test if your work isn’t finished. When you come back to the project, it makes...

log.reflectivesurface.com

The argument that using tests is a ideologic waster of time fails when one considers how it can help to insure architectural decisions...