Feature: Testing a custom HTML backend
Background:
Given I do have a template-based HTML backend with DocTest
Scenario: Some examples do not match the expected output
When I run `bundle exec rake test`
Then the output should contain:
"""
1) Failure:
TestHtml :: block_quote : with_attribution:
Failing example..
A person who never made a mistake never tried anything new.
E
Albert Einstein
A
— Albert Einstein
"""
And the output should contain:
"""
2) Failure:
TestHtml :: document : title_with_author:
This example should fail..
"""
And the output should contain:
"""
5 runs, 3 assertions, 2 failures, 0 errors, 2 skips
"""
Scenario: A necessary template is missing and fallback to the built-in converter is disabled
When I remove the file "templates/inline_quoted.html.slim"
And I run `bundle exec rake test`
Then the output should contain:
"""
Could not find a custom template to handle template_name: inline_quoted
"""
And the output should contain:
"""
1) Failure:
TestHtml :: block_quote : with_attribution:
Failing example..
E
A person who never made a mistake never tried anything new.
E
Albert Einstein
A
A person who never made a mistake --TEMPLATE NOT FOUND-- tried anything new.
A
— Albert Einstein
"""