Closed nirnanaaa closed 9 years ago
+1
Ok, I did some more testing. Here is output of tests with master version:
# Running tests:
[ 49/215] TestEncoding#test_binary_message = 0.00 s
1) Failure:
TestEncoding#test_binary_message [/home/katafrakt/dev/github/grit/test/test_encoding.rb:14]:
<[45,
45,
98,
114,
111,
107,
101,
110,
32,
101,
110,
99,
111,
100,
105,
110,
103,
58,
32,
85,
84,
70,
45,
49,
54,
66,
69]> expected but was
<[255, 216, 255, 224]>.
[ 50/215] TestEncoding#test_encode_string = 0.00 s
2) Failure:
TestEncoding#test_encode_string [/home/katafrakt/dev/github/grit/test/test_encoding.rb:33]:
<"\uCED2\uB0AE\uC4E3"> expected but was
<"我爱你">.
[ 51/215] TestEncoding#test_invalid_encoding = 0.00 s
3) Failure:
TestEncoding#test_invalid_encoding [/home/katafrakt/dev/github/grit/test/test_encoding.rb:20]:
<"--broken encoding: UTF-16BE"> expected but was
<"yummy 🍔 ">.
Finished tests in 0.979023s, 219.6068 tests/s, 562.8063 assertions/s.
215 tests, 551 assertions, 3 failures, 0 errors, 0 skips
And here it is after upgrading mime-types
to 2.4.3:
# Running tests:
[ 49/215] TestEncoding#test_binary_message = 0.00 s
1) Failure:
TestEncoding#test_binary_message [/home/katafrakt/dev/github/grit/test/test_encoding.rb:15]:
<"ASCII-8BIT"> expected but was
<"UTF-8">.
[ 50/215] TestEncoding#test_encode_string = 0.04 s
2) Failure:
TestEncoding#test_encode_string [/home/katafrakt/dev/github/grit/test/test_encoding.rb:33]:
<"\uCED2\uB0AE\uC4E3"> expected but was
<"我爱你">.
[ 51/215] TestEncoding#test_invalid_encoding = 0.00 s
3) Failure:
TestEncoding#test_invalid_encoding [/home/katafrakt/dev/github/grit/test/test_encoding.rb:20]:
<"--broken encoding: UTF-16BE"> expected but was
<"yummy 🍔 ">.
Finished tests in 1.105781s, 194.4326 tests/s, 499.1945 assertions/s.
215 tests, 552 assertions, 3 failures, 0 errors, 0 skips
So I figure those failures are totally unrelated to mime-types
gem, as after update there is actually a progress with a first test (it fails one assertion later). I'm using ruby 2.1.5, anyway.
@nirnanaaa @katafrakt
i think you can close this issue, because the PR #53 update the gem spec file and use at least mime-types
2.6.0
thanks for reporting @rgroux
Hello,
for Rails support (>=4.2.0) it would be nice if mime-types could be upgraded to version 2.4.3. It works like a charm except one minor issue with binary encoding?!
Test fails at: