Shoulda 4.0.1 - the lean and mean release
Posted by Tammer Saleh
Mar 03
Shoulda is a great tool for cleaning up your tests, but there was always some dirt under the hood that was keeping me up at night. I don’t want to just move complexity around – I want to remove it entirely.
A recent change in edge rails forced me to get off my butt and do that.
So everyone give a warm hello to the latest Shoulda gem. It now uses a Context class in the backend, prints out should_eventually tests in a clear way, names the bare shouldas nicely, and fixes a few small bugs.
I also took the opportunity to fix some of the outstanding issues in the shoulda rails plugin (with a lot of great help from the community).
So grab the latest plugin and have some fun:
piston import https://svn.thoughtbot.com/plugins/shoulda/tags/rel-4.0.1 vendor/plugins/shoulda
Also, please let us know if you find any bugs or issues.
Shameless self promotion: While I’m in the blogging mood, I’d like to feature a small “over the weekends” app that I’ve been working on with some other Thoughtbotters:


Comments on this post
Mar 03
Morgan Roderick said,
Wow, that looks really interesting. And excellent timing, as I am just about to dive into writing a lot of tests in 2.0.2.
Thank you so much for sharing this with the community!
Mar 03
Ken Collins said,
Should (no pun) that be a “piston import” command instead of “install”? I got an unknown command error when doing that… BTW, my first time using Piston too.
Mar 04
bryanl said,
Neat.
If you are using to_param in your models, should_be_restful with nested resources won’t work as expected due to the fact it calls for the id.
{ :"#{parent_name}_id" => parent.id }.merge(make_parent_params(resource, parent, parent_names))Other than that… its pretty cool.
Mar 04
Tammer Saleh said,
Ken – Thanks for the catch. Between
port,gem,script/pluginandpiston, I tend to get the commands confused.Smarticus – Thanks for the bug report. I’ve made a ticket in lighthouse.
Sorry, comments are closed for this article.
© 2000 - 2009 by thoughtbot, inc.
written by a bushel of tiny robots
Come “ride the toad” on Hoptoad, the app error app.
Thunder Thimble: Brand monitoring for social media.
Widgetfinger: Simple content management for simple websites.
Tee-Bot, funny shirts your friends won't understand!
Umbrella Today: “It’s like totally the simplest weather report ever, Julie.”
Thoughtbot
thoughtbot is a technology consulting firm that provides web application development and design services. We focus on building modern systems, embracing good ideas and delivering elegant solutions.
Interested in learning Rails?
Sign up for our beginning or advanced training.
Archives