1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: Fix failed unit tests due to encoding errors
Author: Sudheesh Shetty <sudheeshshetty@gmail.com>
Miguel Landaeta <nomadium@debian.org>
--- a/test/relation_test.rb
+++ b/test/relation_test.rb
@@ -171,7 +171,7 @@
rel = Sawyer::Relation.from_link(nil, :self, hash)
map << rel
- assert_equal "{:self_url=>\"/users/1\"}", map.inspect.strip
+ assert_equal "{:self_url=>\"/users/1\"}".force_encoding("UTF-8"), map.inspect.strip
end
end
end
--- a/test/resource_test.rb
+++ b/test/resource_test.rb
@@ -182,7 +182,7 @@
def test_inspect
resource = Resource.new @agent, :a => 1
- assert_equal "{:a=>1}", resource.inspect.strip
+ assert_equal "{:a=>1}".force_encoding("UTF-8"), resource.inspect.strip
end
def test_each
|