class Rspec::Generators::MailerGenerator
@private
Public Instance Methods
generate_fixtures_files()
click to toggle source
# File lib/generators/rspec/mailer/mailer_generator.rb, line 14 def generate_fixtures_files actions.each do |action| @action, @path = action, File.join(file_path, action) template "fixture", target_path("fixtures", @path) end end
generate_mailer_spec()
click to toggle source
# File lib/generators/rspec/mailer/mailer_generator.rb, line 10 def generate_mailer_spec template "mailer_spec.rb", target_path('mailers', class_path, "#{file_name}_spec.rb") end
generate_preview_files()
click to toggle source
# File lib/generators/rspec/mailer/mailer_generator.rb, line 21 def generate_preview_files return unless RSpec::Rails::FeatureCheck.has_action_mailer_preview? template "preview.rb", target_path("mailers/previews", class_path, "#{file_name}_preview.rb") end