- GitHub Staff
- @[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'erb' | |
# lib/missing_spec_generator.rb | |
class MissingSpecGenerator | |
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
def spec_file spec_path, file_name, spec_template, namespace | |
spec_name = file_name.gsub('.rb', '') + '_spec.rb' | |
if File.exist?("#{spec_path}/#{spec_name}") | |
puts "#{spec_path}/#{spec_name} exists" |