Project

testifier

0.0
No commit activity in last 3 years
No release in over 3 years
Creates test and class files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3

Runtime

 Project Readme

Testify creates class and test files

The idea is to lower the barrier just a bit to doing TDD when writing small scripts.

I'd be surprised if there weren't good alternatives out there already. But no, "use an IDE" isn't one of them. If Zeus had meant us to use an IDE, he wouldn't have given us vim.

To use:

testify some_new_filename

This creates two new files:

lib/some_new_filename.rb
spec/lib/some_new_filename_spec.rb

And the files are populated:

% cat lib/some_new_filename.rb 
class SomeNewFilename
end

% cat spec/lib/some_new_filename_spec.rb 
require "lib/some_new_filename"

describe SomeNewFilename do
end

Testify won't write over existing files.

Testify creates directories under lib if they don't already exist:

testify some/path/foo_bar.rb

creates

lib/some/path/foo_bar.rb
spec/lib/some/path/foo_bar_spec.rb

There is a shorter version of the command:

ty some_new_filename

To install:

gem install testify