diff options
Diffstat (limited to 'spec/ruby/core/exception/error_bytes_spec.rb')
-rw-r--r-- | spec/ruby/core/exception/error_bytes_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/ruby/core/exception/error_bytes_spec.rb b/spec/ruby/core/exception/error_bytes_spec.rb index 2a95bcfdf4..66dd4b62c1 100644 --- a/spec/ruby/core/exception/error_bytes_spec.rb +++ b/spec/ruby/core/exception/error_bytes_spec.rb @@ -1,5 +1,12 @@ require_relative '../../spec_helper' describe "Encoding::InvalidByteSequenceError#error_bytes" do - it "needs to be reviewed for spec completeness" + it "returns the error bytes" do + ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1") + begin + ec.convert("\xa0") + rescue Encoding::InvalidByteSequenceError => e + e.error_bytes.should == "\xA0".force_encoding("ASCII-8BIT") + end + end end |