Class: Rspec::Generators::ViewGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/rspec/view/view_generator.rb

Instance Method Summary collapse

Methods inherited from Base

source_root

Instance Method Details

#create_view_specsObject


10
11
12
13
14
15
16
17
18
# File 'lib/generators/rspec/view/view_generator.rb', line 10

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