Sha256: bf646f59e663e4666d0e143fd4cf7efd63c50bdab8ef5d08b090053fee60d99b
Contents?: true
Size: 561 Bytes
Versions: 29
Compression:
Stored size: 561 Bytes
Contents
class TestUnitGenerator < RubiGen::Base attr_reader :name, :test_name, :class_name def initialize(runtime_args, runtime_options = {}) super usage if args.empty? @name = args.shift @test_name = "test_#{name}".underscore @class_name = name.camelize end def manifest record do |m| m.directory 'test' # Model class, unit test, and fixtures. m.template 'test.rb', "test/#{test_name}.rb" end end protected def banner "Usage: #{$0} #{spec.name} NameOfTest" end end
Version data entries
29 entries across 29 versions & 1 rubygems