summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-04-21 18:42:24 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-04-21 18:42:24 -0700
commita9ae440827c27ee2cb7d815559fee40d336767c1 (patch)
treeef2807e0cea36fc353d2d0cc95b91df5cd2b1b14 /spec
parent81d7f50761799fdc11c6e8bf627020dc9103fadf (diff)
downloadffi-yajl-a9ae440827c27ee2cb7d815559fee40d336767c1.tar.gz
emit token that failed utf-8 validation
plus code cleanup of the c-extension
Diffstat (limited to 'spec')
-rw-r--r--spec/ffi_yajl/encoder_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ffi_yajl/encoder_spec.rb b/spec/ffi_yajl/encoder_spec.rb
index 0eef23d..5691bf6 100644
--- a/spec/ffi_yajl/encoder_spec.rb
+++ b/spec/ffi_yajl/encoder_spec.rb
@@ -187,7 +187,7 @@ describe "FFI_Yajl::Encoder" do
}
it "raises an error on invalid json" do
- expect{ encoder.encode(ruby) }.to raise_error(FFI_Yajl::EncodeError, "Invalid UTF-8 string: cannot encode to UTF-8")
+ expect{ encoder.encode(ruby) }.to raise_error(FFI_Yajl::EncodeError, /Invalid UTF-8 string 'Elan Ruusam.e': cannot encode to UTF-8/)
end
context "when validate_utf8 is off" do