When your site is on HTTPS and you are linking or redirecting to a HTTP site, the browser will not...
In the following example the method update_offices_people_count won't be called when office_id changes, because it...
Rails gives you migrations to change your database schema with simple commands like add_column or update. Unfortunately these commands...
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...
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...
TL;DR: You should generally use #size to count associated records. size Counts already loaded elements If the association is...
Safari & Chrome Use $x() in your console: $x('//span') # selects all span elements Firefox There's an add-on.
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 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...
Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...
Apache HTTP server benchmarking tool (ab) is a nice tool to test performance on sites delivered by HTTP. If the...
Every time you call $(...) jQuery will create a new object. Because of this, comparing two jQuery collections with == will never...
TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...
As attachments to this card you will find a Cucumber feature and supplementing step definition that you can use to...
The basic idea is pretty simple: an element's height is accessible via the offsetHeight property, its drawn height via...
Capybara uses www.example.com as the default hostname when making requests. If your application does something specific on certain hostnames and...
Selenium cannot reliably control a browser when its window is not in focus, or when you accidentally interact with the...