summaryrefslogtreecommitdiff
path: root/spec/ruby/core/encoding/converter/destination_encoding_spec.rb
blob: 2d0f8e06975ab860c10718e9de327ca48a87a6dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require_relative '../../../spec_helper'

with_feature :encoding do
  describe "Encoding::Converter#destination_encoding" do
    it "returns the destination encoding as an Encoding object" do
      ec = Encoding::Converter.new('ASCII','Big5')
      ec.destination_encoding.should == Encoding::BIG5

      ec = Encoding::Converter.new('SJIS','EUC-JP')
      ec.destination_encoding.should == Encoding::EUC_JP
    end
  end
end