Skip to content
Browse files

Fix a test failure on Ruby 2.0.

  • Loading branch information...
1 parent 87e4d1e commit 30ede16d16e70e9c092a514b879de2779100a579 @arthurschreiber arthurschreiber committed Jun 17, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 test/diff_test.rb
View
6 test/diff_test.rb
@@ -684,7 +684,7 @@ def test_patch
diff = a.tree.diff(b.tree)
- assert_equal <<-EOS, diff.patch
+ expected = <<-EOS
diff --git a/another.txt b/another.txt
index 3e5bcba..546c735 100644
--- a/another.txt
@@ -755,6 +755,10 @@ def test_patch
+it.!
\\ No newline at end of file
EOS
+
+ expected.force_encoding('binary') if expected.respond_to?(:force_encoding)
+
+ assert_equal expected, diff.patch
end
def test_patch_compact

0 comments on commit 30ede16

Please sign in to comment.
Something went wrong with that request. Please try again.