Updated

spec/mailers/previews / sponsor_mailer_preview.rb

A
13 lines of codes
2 methods
4.1 complexity/method
3 churn
8.25 complexity
0 duplications
# Preview all emails at http://localhost:3000/rails/mailers/sponsor_mailer class SponsorMailerPreview < ActionMailer::Preview def petition_and_email_confirmation_for_sponsor
  1. SponsorMailerPreview#petition_and_email_confirmation_for_sponsor doesn't depend on instance state (maybe move it to another class?)
SponsorMailer.petition_and_email_confirmation_for_sponsor(Signature.sponsors.last) end def sponsor_signed_email_on_threshold
  1. SponsorMailerPreview#sponsor_signed_email_on_threshold doesn't depend on instance state (maybe move it to another class?)
sponsor = Signature.sponsors.last petition = sponsor.petition SponsorMailer.sponsor_signed_email_on_threshold(sponsor) end end