Sha256: b065c57e91d8cb01ff0ea0e7fd8da9b0b60134a6f78612c7651df74cbb6403d1
Contents?: true
Size: 534 Bytes
Versions: 1
Compression:
Stored size: 534 Bytes
Contents
require "bun_bo/version" 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 puts "File does not exists" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bun_bo-0.1.2 | lib/bun_bo.rb |