Sha256: 5c0e090e3dd83e39efc29e0a6d4811e748a05dd0f6ebb08dfedfdde01c07c547
Contents?: true
Size: 557 Bytes
Versions: 1
Compression:
Stored size: 557 Bytes
Contents
require "bun_bo/version" require "bun_bo/file_not_found" require 'fileutils' class BunBo def run(input_path) input_path = Pathname.new(input_path) if input_path.file? folder_path, file_name = input_path.split extension = file_name.extname base_name = file_name.basename(extension) test_folder = folder_path.sub(/^(app|lib)/, 'spec') test_path = test_folder.join("#{base_name}_spec").sub_ext(".rb") FileUtils.mkdir_p(test_folder) test_path.write('') else raise FileNotFound end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bun_bo-0.1.3 | lib/bun_bo.rb |