From a9ae440827c27ee2cb7d815559fee40d336767c1 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Tue, 21 Apr 2015 18:42:24 -0700 Subject: emit token that failed utf-8 validation plus code cleanup of the c-extension --- spec/ffi_yajl/encoder_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec') 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 -- cgit v1.2.1