Sha256: 83c1472560b7a1acc662ac17e2332f6d4b07edea2f514b6b6347550e559e942d

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

require 'thor'
require 'fileutils'

module MtGen
  VERSION = "0.2.0"

  class CLI < Thor
    desc "test", "Generates minitest skeleton in current directory"
    def test
      generate("test")
    end

    desc "spec", "Generates minitest skeleton (spec) in current directory"
    def spec
      generate("spec")
    end

    private

    def generate(type)
      src = File.dirname(__FILE__) + "/minitest_files/#{type}"
      dest = "."
      FileUtils.cp_r(src, dest)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mtgen-0.2.0 lib/mtgen.rb