summaryrefslogtreecommitdiff
path: root/spec/ruby/core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb
blob: 106fc7ecacdb5c0c1f63ee7e3016613e34c9a310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require_relative '../fixtures/classes'

describe "Encoding::UndefinedConversionError#destination_encoding_name" do
  before :each do
    @exception = EncodingSpecs::UndefinedConversionError.exception
  end

  it "returns a String" do
    @exception.destination_encoding_name.should be_an_instance_of(String)
  end

  it "is equal to the destination encoding name of the object that raised it" do
    @exception.destination_encoding_name.should == "US-ASCII"
  end
end