MetaSkills.net

Autotestify Brothers and Sisters

Posted On: December 30th, 2008 by kencollins

Based on my previous article Using Autotest For Rails Plugin Development, Brennan Dunn wrote a ZSH function that helps him with his eager rails plugin work. Testing plugins is simply the most fun you will ever have. It's nice to test in isolation and easy to make a plugin test multiple rails versions, etc. Typically plugin testing is very fast to because you are not burdened with excessive tests in a big app that might use it. Just the ones needed to test the plugin. Enjoy this ZSH function.

function autotestify () {
  git clone git://github.com/metaskills/autotest_railsplugin.git
  rm -rf ./autotest_railsplugin/.git
  mv ./autotest_railsplugin ./autotest
}

Plug It In Plug It In

Posted On: October 10th, 2008 by kencollins

Jack Has Many Things I've been busy putting together some plugins form misc work. If you did not catch my latest article Jack has_many :things where I covered GroupeScope, by all means check it out. I've also just finished up a pretty solid backport of NamedScope that can be found on my Github page. It bills itself as a well tested complete back port for rails 1.2.6 and 2.0.4.

One thing that has been a real help while I've been developing these plugins is this autotest class I put together specifically for developing rails plugins. I even got mention on rubyonrails.org. Sweet! More to come.

Resources

Tags: rails, plugin

Jack has_many :things

Posted On: September 28th, 2008 by kencollins
Jack Has Many Things

I am Jack's sofa, stereo and wardrobe... I make Jack's life complete. I reside in a ActiveRecord table called "things" and Jack is the only one that has the key. This is Jack's life, and it's ending one minute at a time.

As rails developers, we have done this simple relationship over and over again. I'm sure the has_many association is by far the most common in app/db design. It gives a single resource quick and easy access to others, but as your application grows, and depression sets in...

Using Autotest For Rails Plugin Development

Posted On: September 19th, 2008 by kencollins

I love autotest. I have event posted before how to extend the idea of autotest sounds to a red/green playlist but now that I am taking more time to extract some of my work to plugins, I really wanted autotest to come with me. The problem is that the default autotest mappings do not play with rails conventions, the biggest being that test files for a lib match the name of the lib with _test.rb at the END of the...