mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Remove Rails strip_heredoc dependency since Rails is not listed as a add_development_dependency.
This commit is contained in:
parent
1ee68103ec
commit
8d87234ded
1 changed files with 18 additions and 18 deletions
|
@ -88,23 +88,23 @@ RSpec.describe 'AwesomePrint' do
|
|||
|
||||
it 'wraps multiline ap output with <pre> tag with colorized <kbd>' do
|
||||
markup = [1, :two, 'three']
|
||||
expect(markup.ai(html: true)).to eq <<-EOS.strip_heredoc.strip
|
||||
<pre>[
|
||||
expect(markup.ai(html: true)).to eq <<-EOS.strip
|
||||
<pre>[
|
||||
<kbd style="color:white">[0] </kbd><kbd style="color:blue">1</kbd>,
|
||||
<kbd style="color:white">[1] </kbd><kbd style="color:darkcyan">:two</kbd>,
|
||||
<kbd style="color:white">[2] </kbd><kbd style="color:brown">"three"</kbd>
|
||||
]</pre>
|
||||
]</pre>
|
||||
EOS
|
||||
end
|
||||
|
||||
it 'wraps hash ap output with only an outer <pre> tag' do
|
||||
markup = [{ 'hello' => 'world' }]
|
||||
expect(markup.ai(html: true)).to eq <<-EOS.strip_heredoc.strip
|
||||
<pre>[
|
||||
expect(markup.ai(html: true)).to eq <<-EOS.strip
|
||||
<pre>[
|
||||
<kbd style="color:white">[0] </kbd>{
|
||||
"hello"<kbd style="color:slategray"> => </kbd><kbd style="color:brown">"world"</kbd>
|
||||
}
|
||||
]</pre>
|
||||
]</pre>
|
||||
EOS
|
||||
end
|
||||
|
||||
|
@ -130,12 +130,12 @@ RSpec.describe 'AwesomePrint' do
|
|||
AwesomePrint.defaults = { indent: -2, sort_keys: true }
|
||||
hash = { [0, 0, 255] => :yellow, :red => 'rgb(255, 0, 0)', 'magenta' => 'rgb(255, 0, 255)' }
|
||||
out = hash.ai(plain: true)
|
||||
expect(out).to eq <<-EOS.strip_heredoc.strip
|
||||
{
|
||||
expect(out).to eq <<-EOS.strip
|
||||
{
|
||||
[ 0, 0, 255 ] => :yellow,
|
||||
"magenta" => "rgb(255, 0, 255)",
|
||||
:red => "rgb(255, 0, 0)"
|
||||
}
|
||||
}
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue