-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Conversation
end | ||
|
||
test do | ||
output = shell_output("#{bin}/MailHog -h 2>&1 | head -n 1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can’t we write a better test than e.g. -h
/-help
/-version
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid point. Given that MailHog
outputs debug messages when run directly, test should check against that.
- Starting "A" removed from formula description - Test updated to check for default ./MailHog output instead of help output - Information about sendmail replacement is displayed after installation, instead of using caveats function.
- Test caused execution expiration as MailHog kept running in the background. Fixed by redirecting the output to /dev/null. - Text match assertion wrapped in // instead of %r{}. - Whitespace removed.
- Test caused execution expiration as MailHog kept running in the background. Fixed by killing the process in 3 seconds. - Info message removed as sendmail replacement option is documented on MailHog project page.
Is there anything else that needs to be done for this formula to be merged? |
end | ||
|
||
def install | ||
mkdir_p "#{buildpath}/src/github.com/mailhog/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use (buildpath/"src/github.com/mailhog/").mkpath
EOS | ||
end | ||
|
||
test do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the mpd style test here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DomT4 Indeed, utilizing Process.kill
is a leaner approach.
MailHog is a Go-based email testing tool for developers.
This formula builds and installs MailHog version 0.1.8.