Sha256: 19f65da26974c0b9d0c54a28950577fcc4f10afe4a7a069bd78e4354e76b5707
Contents?: true
Size: 605 Bytes
Versions: 27
Compression:
Stored size: 605 Bytes
Contents
require 'generators/rspec' module Rspec module Generators class ViewGenerator < Base argument :actions, :type => :array, :default => [], :banner => "action action" class_option :template_engine, :desc => "Template engine to generate view files" def create_view_files empty_directory File.join("spec", "views", file_path) actions.each do |action| @action = action template 'view_spec.rb', File.join("spec", "views", file_path, "#{@action}.html.#{options[:template_engine]}_spec.rb") end end end end end
Version data entries
27 entries across 27 versions & 1 rubygems