Pointers/Help for testing action_view based plugins?

Hi all -

Writing my first plugin that overwrites stylesheet_link_tag. In trying
be good I even borrowed the tests for the original method and put them
into my plugin’s testing code.

But to make it all work I ended up having to do this at the top:

$:.unshift(File.dirname(FILE) + “/…/…/…/rails/actionpack/lib”)
$:.unshift(File.dirname(FILE) +
require ‘action_controller’
require ‘action_controller/assertions’
require ‘action_view’
require File.dirname(FILE) + “/…/lib/stylesheets_for_all.rb”

require ‘test/unit’

class StylesheetsForAllTest < Test::Unit::TestCase
include ActionView::Helpers::TagHelper
include ActionView::Helpers::UrlHelper
include ActionView::Helpers::AssetTagHelper

Which is just nasty. And assumes you have rails frozen into vendor
obviously might not be the case. I tried following the includes for the
original tests, but it’s all wrapped up in itself to automate a lot of
and on a Friday afternoon it made my heat hurt :slight_smile:

There must be some tips and docs on how to do this properly?

Any links, blogs, tutorials any of you might have would be greatly

I’d like to make this available, but can’t as it stands now…

Thanks all!