Skip to content

Commit

Permalink
Fix tests for pygments.rb 0.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Oct 7, 2012
1 parent b798e28 commit d92d208
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions test/test_blob.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def test_indexable
assert !blob("Binary/github.po").indexable?
assert !blob("Binary/linguist.gem").indexable?

# large binary blobs should fail on size check first, not call
# large binary blobs should fail on size check first, not call
# into charlock_holmes and alloc big buffers for testing encoding
b = blob("Binary/octocat.ai")
b.expects(:binary?).never
Expand All @@ -291,11 +291,10 @@ def test_lexer
end

def test_colorize
assert_equal <<-HTML, blob("Ruby/foo.rb").colorize
assert_equal <<-HTML.chomp, blob("Ruby/foo.rb").colorize
<div class="highlight"><pre><span class="k">module</span> <span class="nn">Foo</span>
<span class="k">end</span>
</pre>
</div>
</pre></div>
HTML
end

Expand Down
5 changes: 2 additions & 3 deletions test/test_language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,11 @@ def test_eql


def test_colorize
assert_equal <<-HTML, Language['Ruby'].colorize("def foo\n 'foo'\nend\n")
assert_equal <<-HTML.chomp, Language['Ruby'].colorize("def foo\n 'foo'\nend\n")
<div class="highlight"><pre><span class="k">def</span> <span class="nf">foo</span>
<span class="s1">&#39;foo&#39;</span>
<span class="k">end</span>
</pre>
</div>
</pre></div>
HTML
end
end

0 comments on commit d92d208

Please sign in to comment.