Permalink
Browse files

Reset config after each test case to avoid clashes

  • Loading branch information...
1 parent 93b1e8b commit f82ccf77359e2d7026ad51aa354b7d9136d8bd1f @colszowka colszowka committed Sep 6, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/markerb_test.rb
View
@@ -35,6 +35,16 @@ def normal_text(text)
class MarkerbTest < ActiveSupport::TestCase
+ setup do
+ @original_renderer = Markerb.renderer
+ @original_processing_options = Markerb.processing_options
+ end
+
+ teardown do
+ Markerb.renderer = @original_renderer
+ Markerb.processing_options = @original_processing_options
+ end
+
test "plain text should be sent as a plain text" do
email = Notifier.contact("you@example.com", :text)
assert_equal "text/plain", email.mime_type

0 comments on commit f82ccf7

Please sign in to comment.