summaryrefslogtreecommitdiff
path: root/spec/ruby/core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb
blob: a51a9f46a00656dd65a3a7dc0ceaf618a9de043f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require_relative "../../../spec_helper"
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