test/functional/examples.rb in coderay-1.0.4 vs test/functional/examples.rb in coderay-1.0.5.rc1
- old
+ new
@@ -95,10 +95,9 @@
<div class="code"><pre>{ <span class="key"><span class="delimiter">"</span><span class="content">just</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">an</span><span class="delimiter">"</span></span>, <span class="key"><span class="delimiter">"</span><span class="content">example</span><span class="delimiter">"</span></span>: <span class="integer">42</span> }</pre></div>
</div>
DIV
# highlight a file (HTML div); guess the file type base on the extension
- require 'coderay/helpers/file_type'
assert_equal :ruby, CodeRay::FileType[__FILE__]
# get a new scanner for Python
python_scanner = CodeRay.scanner :python
assert_kind_of CodeRay::Scanners::Python, python_scanner