Skip to content

Instantly share code, notes, and snippets.

@knowtheory
Created April 25, 2009 18:12
Show Gist options
  • Select an option

  • Save knowtheory/101707 to your computer and use it in GitHub Desktop.

Select an option

Save knowtheory/101707 to your computer and use it in GitHub Desktop.

Contributing to DataMapper: A HowTo

DataMapper is a complex piece of technology. It's modularity creates a tremendous flexibility and potential, but it is also important that we constrain ourselves from that full flexibility, and provide a shared consensus on how DataMapper should be tested and developed.

DataMapper as you may know is divided up into dm-core and dm-more. Core is where the heavy lifting and shared code lies, more is where additional features that plug into Core reside, along with a few additional adapters.

This post is intended to explain how to test core, so that others might be able to join in and contribute.

Testing dm-core isn't an easy business. DataMapper's core classes and modules exist here, and ultimately need to be tested against all the included storage engines that are supported by DataMapper out of the box (in memory, yaml, sqlite3, mysql, postgres). However this is rather unwieldy when attempting to tighten the Test-Code cycle, since the specs take a long time to run.

For immediate testing purposes, you can test against one or more adapters by invoking spec in the following manner:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment