---
title: Shoulda gets all sparkly
teaser:
tags: news,web,ruby,shoulda
author: Tammer Saleh
published_on: 2007-11-29
---

The [Shoulda testing plugin](https://github.com/thoughtbot/shoulda) has been
getting some love lately.   Read on to see what we've done.

### Stripped down Gem

The core components of Shoulda have been moved into their own gem.  This pretty
much just includes the `context` and `should` blocks, letting you do things like
this:

    context "a plain old ruby program" do
    setup { ... }

    should "be able to use the shoulda gem" do
      ...
    end
    ...
    end

outside of a rails application.  This is something that a lot of people have
been asking for, both on the [Google
group](https://groups.google.com/group/shoulda), and inside thoughtbot.

You can find the gem on [rubyforge](http://rubyforge.org/projects/shoulda/), and
installation is as simple as `sudo gem install shoulda`.

**You do not have to install the gem to use the plugin**, as the plugin already
has the core gem components inside it (thanks to the magic of
[piston](http://piston.rubyforge.org/)).

### Bugs beware

We've also opened a lighthouse account to keep track of known bugs and
improvement requests.  This is the first time we've used lighthouse for any of
our projects, and we're pretty interested in seeing how well it holds up.

So hit the [lighthouse
page](http://tammer.lighthouseapp.com/projects/5807-shoulda/overview) and let us
know of any bugs you've found.

### Minor release - 3.0.5

Finally, we've strengthened some of the generated active record tests.
`should_have_many`, `should_have_one`, and `should_belong_to` all now check the
database schema to make sure your foreign keys are in place.  We bundled that
and a few small bug fixes into the latest release:
[3.0.5](https://svn.thoughtbot.com/plugins/shoulda/tags/rel-3.0.5).  As you can
tell from the major version of **3**, Shoulda is now more mature than Rails.
