rspec-documentation

0.0.11
Light Mode Dark Mode

HTML

Setting the code block language to rspec:html indicates that the output should be treated as HTML which adds a tab displaying auto-formatted HTML and another tab showing the rendered output.

Markdown

```rspec:html
subject do
  <<~HTML
    <table class="table">
      <thead>
        <tr><th>Heading 1</th><th>Heading 2</th></tr>
      </thead>
      <tbody>
        <tr><td>Value 1</td><td>Value 2</td></tr>
        <tr><td>Value 3</td><td>Value 4</td></tr>
      </tbody>
    </table>
  HTML
end

it { is_expected.to include 'Value 1' }
```

Output

subject do
  <<~HTML
    <table class="table">
    <thead>
      <tr><th>Heading 1</th><th>Heading 2</th></tr>
    </thead>
    <tbody>
      <tr><td>Value 1</td><td>Value 2</td></tr>
      <tr><td>Value 3</td><td>Value 4</td></tr>
    </tbody>
    </table>
  HTML
end

it { is_expected.to include 'Value 1' }
<table class="table">
  <thead>
    <tr>
      <th>Heading 1</th>
      <th>Heading 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Value 1</td>
      <td>Value 2</td>
    </tr>
    <tr>
      <td>Value 3</td>
      <td>Value 4</td>
    </tr>
  </tbody>
</table>
Heading 1 Heading 2
Value 1 Value 2
Value 3 Value 4

Documentation generated by rspec-documentation