How to send a test e-mail from shell

Posted About 13 years ago by Arne Hartherz.

If you want to manually check if e-mail delivery works on a machine by sending an e-mail you...

Imperative vs Declarative Scenarios in User Stories

Posted About 13 years ago by Lexy.
benmabey.com

Bryan talked about the differences between imperative and declarative scenarios. In my opinion, both styles have benefits and should be...

Where to put custom RSpec matchers

Posted About 13 years ago by Henning Koch.

When you write a custom RSpec matcher a good place to store them is to create one file per matcher...

Test that a hash contains a partial hash with RSpec

Posted About 13 years ago by Henning Koch.

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

Acceptance testing using Capybara's new RSpec DSL

Posted About 13 years ago by Lexy.
jeffkreeftmeijer.com

Back when Steak was first released, Capybara didn’t have any of the nice RSpec helpers it does now. A...

Caching in Rails

Posted About 13 years ago by Ulrich Berkmueller.

The information in this card is only relevant for Rails 2.3-era apps. This note gives a quick introduction into...

Liquid Canvas

Posted About 13 years ago by Arne Hartherz.
ruzee.com

Liquid Canvas is a JavaScript library which allows you to draw inside an HTML canvas element with an easy yet...

Upgrade from Ruby 1.8.7 to Ruby 1.9.2 on Ubuntu

Posted About 13 years ago by Henning Koch.

Note that you cannot currently use Ruby 1.9.2 with Rails 2 applications that use RSpec, so don't upgrade if...

Prevent an ActiveRecord attribute from being changed after creation

Posted About 13 years ago by Henning Koch.

Sometimes you can make your life easier by not allowing a record attribute to be changed after the record was...

Upgrading Cucumber and Capybara to the latest versions available for Rails 2

Posted About 13 years ago by Ulrich Berkmueller.

Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2

Onload callback for dynamically loaded images

Posted About 13 years ago by Tobias Kraze.

Sometimes you need to dynamically load an image and do something as soon as its loaded (when for example its...

Customize your Bash prompt

Posted About 13 years ago by Dominik Schöler.
github.com

The shell variable PS1 holds your bash prompt. You might want to change it to serve your needs best. Here...

Sanitize user-generated filenames and only send files inside a given directory

Posted About 13 years ago by Thomas Eisenbarth.

If in your application your users pass along params that result in filenames, like invoices/generated?number=123. This could be...

CSS3 Pie: Element not properly redrawn

Posted About 13 years ago by Tobias Kraze.

Pie sometimes does not properly redraw elements upon changes. This often happens when the change comes from somewhere further up...

RSpec matcher to check if an ActiveRecord exists in the database

Posted About 13 years ago by Henning Koch.

The attached RSpec matcher exist_in_database checks if a given record still exists in the database and has not...

Mocks and stubs in Test::Unit when you are used to RSpec

Posted About 13 years ago by Henning Koch.

We are maintaining some vintage projects with tests written in Test::Unit instead of RSpec. Mocks and stubs are not...

Alternative to url_for's deprecated :overwrite_params option

Posted About 13 years ago by Ulrich Berkmueller.

If you have the following deprecation warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated...

Output the descriptions of RSpec examples while they are running

Posted About 13 years ago by Ulrich Berkmueller.

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

Delete all MySQL records while keeping the database schema

Posted About 13 years ago by Henning Koch.

You will occasionally need to clean out your database while keeping the schema intact, e.g. when someone inserted data in...

Synchronize a Selenium-controlled browser with Capybara

Posted About 13 years ago by Henning Koch.

When you click a link or a press a button on a Selenium-controlled browser, the call will return control...

plus2/whereuat - GitHub

Posted About 13 years ago by Lexy.
github.com

Adds a slide out panel to your Rails application that directs clients to test stories that have been marked as...

Traversing the DOM tree with jQuery

Posted About 13 years ago by Henning Koch.
api.jquery.com

jQuery offers many different methods to move a selection through the DOM tree. These are the most important: $element.find(selector...

Unexpected behavior when changing both an association and its foreign key attribute in ActiveRecord

Posted About 13 years ago by Henning Koch.

When you set both a record's association and that association's foreign key attribute, Rails does not realize you...

Why two Ruby Time objects are not equal, although they appear to be

Posted About 13 years ago by Henning Koch.

So you are comparing two Time objects in an RSpec example, and they are not equal, although they look equal...