class Rspec::Generators::MailerGenerator
def generate_preview_files
def generate_preview_files return unless RSpec::Rails::FeatureCheck.has_action_mailer_preview? file_suffix = file_name.end_with?('mailer') ? 'preview.rb' : 'mailer_preview.rb' template "preview.rb", target_path("mailers/previews", class_path, [file_name, file_suffix].join('_')) end