In specs, the session never persists but is always a new object for each request. Data put into the session...

Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...

The User-Agent HTTP header identifies the client and is sent by "regular" browsers, search engine crawlers, or other web...

When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...

Unfortunately, Capybara does not offer a switch to disable cookies in your test browser. However, you can work around that...

To set a cookie in your test browser for cucumber tests, you need to know which driver you are using...

The following code doesn't work like expected: page.find(css_selector).find(other_css_selector) The second .find will search...

opensoul.org

Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy...

Consider this class: class Foo private def test puts "Hello" end end While you can say create a block to...

web.archive.org

TL;DR: You should generally use #size to count associated records. size Counts already loaded elements If the association is...

calc() lets you mix CSS units. Ever wanted to give an element "the container's width minus 20px on each...

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

JavaScript has no built-in functions to compare two objects or arrays for equality of their contained values.

github.com

MongoMapper is a MongoDB adapter for Ruby. We've forked it so it works for Rails 2.3.x applications running...

If you open a pop-up window [1] in your Selenium tests and you want to close it, you can...

gist.github.com

Rails 2.3.16+ on Ruby 1.9 causes warnings like this: .../gems/activesupport-2.3.17/lib/active_support/core_ext/string/output_safety.rb:22: warning: regexp match /.../n against to UTF-8 string...

If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...

If others on a call (Skype, SIP, ...) can not hear you loud enough, your volume levels are probably too low...

Microsoft provides virtual machines for different Internet Explorer versions. The images are available for various virtualization solutions, including VirtualBox...

rubydoc.info

When you accept a table in your Cucumber step definition, that table object will have the cryptic type Cucumber::Ast...

Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...

Consul 0.6.1+ gives your Power class a number of static methods that behave neutrally in case Power.current is nil. This...

Calling bundle update GEMNAME will update a lot more gems than you think. E.g. when you do this...

Calling bundle update (without arguments) updates all your gems at once. Given that many gems don't care about stable...