Sha256: fbb723357e661b2fb8b9b6d2146efeefe9654e9163f48374c48607ffdf56755d
Contents?: true
Size: 605 Bytes
Versions: 59
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_specs 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
59 entries across 54 versions & 5 rubygems