mikel/mail — pull request #678 by tjouan (2014-02-22 17:43:53+00:00)
Title: Refactor Mail::Sendmail specs

I'd like to suggest those spec changes, that may improve clarity and
readability, but main intent is a first step to facilitate working on
Mail::Sendmail tests, when changes or fixes are required (related to
specs or code).

This change is still big, it's the first step of pull-request #674
that won't be merged, understandably.

Let me know if I should break this one into many commits, but I think
all those modifications fit in a single pull-request.

- - -

* Specify class name for top level describe block;
* Use before {}, same as before(:each) {};
* Refactor all similar or identical mail building code with let()
helper;
* Set :sendmail delivery_method in global before block, as it was
currently called in every single examples;
* Use `described_class' instead of hard coded class name;
* Remove the word `should' from all example descriptions;
* Use context instead of describe since we aren't really unit-testing;
* Fix wording in few example descriptions;
* Remove all "dead" code unrelated to the subject under test, or
irrelevant for the concerned example.

Few minor changes:

* Fix inconsistencies in ruby quotes usages (' vs ");
* Fix long lines;
* Fix inconsistencies in blank line usages;
* Remove trailing spaces.