We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...

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

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

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

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

makandra dev
blog.mozilla.org

Prepare to explain customers what changed if your application renders PDF documents to users.

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

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

makandra dev
jakiestfu.github.com

Behave.js is a lightweight library for adding IDE style behaviors to plain text areas, making it much more enjoyable to...

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