Here is a snippet of my vimrc that fits in the template when I create a file called test_something.rb. You can probably use a similar autocmd to conditionally add the copyright you require. You may need to check the extended path in the function, but it seems to be possible with some vimscripting.
" Autocommands
autocmd BufNewFile *test*.rb call MakeRubyUnitTester()
"
" Functions
" Fill in the boilerplate for Ruby Unit Tests
function! MakeRubyUnitTester()
exec "normal irequire 'test/unit'
class TC_Simple < Test::Unit::TestCase"
endfunction
source
share