rails/rails — pull request #14318 by arthurnn (2014-03-07 19:54:59+00:00)
Title: Make sure we clean preview_interceptors

Attempt to fix the random failures on mailer base test.

Failing test:
```
1) Failure:
BaseTest#test_you_can_register_multiple_preview_interceptors_to_the_mail_object_that_both_get_passed_the_mail_object_before_previewing [/home/travis/build/rails/rails/actionmailer/lib/action_mailer/preview.rb:99]:
unexpected invocation: BaseTest::MyInterceptor.previewing_email(#)
unsatisfied expectations:
- expected exactly once, not yet invoked: BaseTest::MyInterceptor.previewing_email(#)
- expected exactly once, not yet invoked: BaseTest::MySecondInterceptor.previewing_email(#)
satisfied expectations:
- allowed any number of times, not yet invoked: BaseTest::BaseMailerPreview.welcome(any_parameters)
```

We should make sure we clean `preview_interceptors` after each test so they dont leak to the next test.

cc @pixeltrix