diff options
Diffstat (limited to 'spec/rubyspec/core/encoding/converter/source_encoding_spec.rb')
-rw-r--r-- | spec/rubyspec/core/encoding/converter/source_encoding_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/rubyspec/core/encoding/converter/source_encoding_spec.rb b/spec/rubyspec/core/encoding/converter/source_encoding_spec.rb new file mode 100644 index 0000000000..acec01502d --- /dev/null +++ b/spec/rubyspec/core/encoding/converter/source_encoding_spec.rb @@ -0,0 +1,13 @@ +require File.expand_path('../../../../spec_helper', __FILE__) + +with_feature :encoding do + describe "Encoding::Converter#source_encoding" do + it "returns the source encoding as an Encoding object" do + ec = Encoding::Converter.new('ASCII','Big5') + ec.source_encoding.should == Encoding::US_ASCII + + ec = Encoding::Converter.new('Shift_JIS','EUC-JP') + ec.source_encoding.should == Encoding::SHIFT_JIS + end + end +end |