class Rspec::Generators::MailerGenerator

def generate_mailer_spec

def generate_mailer_spec
  file_suffix = file_name.end_with?('mailer') ? 'spec.rb' : 'mailer_spec.rb'
  template "mailer_spec.rb", target_path('mailers', class_path, [file_name, file_suffix].join('_'))
end