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 27 28
|
Description: Fix failed unit tests due to encoding errors
Author: Sudheesh Shetty <sudheeshshetty@gmail.com>
Miguel Landaeta <nomadium@debian.org>
Forwarded: no
Last-Update: 2016-03-19
--- a/test/relation_test.rb
+++ b/test/relation_test.rb
@@ -168,7 +168,7 @@
rel = Sawyer::Relation.from_link(nil, :self, hash)
map << rel
- assert_equal "{:self_url=>\"/users/1\"}", map.inspect
+ assert_equal "{:self_url=>\"/users/1\"}".force_encoding("UTF-8"), map.inspect
end
end
end
--- a/test/resource_test.rb
+++ b/test/resource_test.rb
@@ -180,7 +180,7 @@
def test_inspect
resource = Resource.new @agent, :a => 1
- assert_equal "{:a=>1}", resource.inspect
+ assert_equal "{:a=>1}".force_encoding("UTF-8"), resource.inspect
end
def test_each
|