extraction de helpers de test
This commit is contained in:
parent
5a61c51ded
commit
a05c66d9a8
|
@ -10,4 +10,16 @@ class ActiveSupport::TestCase
|
||||||
fixtures :all
|
fixtures :all
|
||||||
|
|
||||||
# Add more helper methods to be used by all tests here...
|
# Add more helper methods to be used by all tests here...
|
||||||
|
|
||||||
|
def email_from_eml(file_fixture_name)
|
||||||
|
eml = file_fixture(file_fixture_name).read
|
||||||
|
mail = Mail.from_source(eml)
|
||||||
|
email_importer = EmailImporter.new
|
||||||
|
|
||||||
|
email_importer.import(mail)
|
||||||
|
end
|
||||||
|
|
||||||
|
def assert_no_html(text)
|
||||||
|
assert_no_match(/<\/?(p|b|br|img)\/?>/, text)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue