Sha256: 24b95fbc3c6204d31cbcefacd477869ed43da14a56a923aaf8498fa96a5fce1e

Contents?: true

Size: 963 Bytes

Versions: 52

Compression:

Stored size: 963 Bytes

Contents

require File.expand_path('../../fixtures/classes', __FILE__)

with_feature :encoding do
  describe "Encoding::UndefinedConversionError#error_char" do
    before(:each) do
      @exception = EncodingSpecs::UndefinedConversionError.exception
      @exception2 = EncodingSpecs::UndefinedConversionErrorIndirect.exception
    end

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

    it "returns the one-character String that caused the exception" do
      @exception.error_char.size.should == 1
      @exception.error_char.should == "\u{8765}"

      @exception2.error_char.size.should == 1
      @exception2.error_char.should == "\u{A0}"
    end

    it "uses the source encoding" do
      @exception.error_char.encoding.should == @exception.source_encoding

      @exception2.error_char.encoding.should == @exception2.source_encoding
    end
  end
end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
rhodes-7.6.0 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-7.5.1 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-7.4.1 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-7.1.17 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-6.2.0 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-6.0.11 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-5.5.18 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-5.5.17 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-5.5.15 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-5.5.0.22 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-5.5.2 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-5.5.0.7 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-5.5.0.3 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-5.5.0 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
tauplatform-1.0.3 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
tauplatform-1.0.2 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
tauplatform-1.0.1 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-3.5.1.12 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-3.3.5 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb
rhodes-3.4.2 spec/framework_spec/app/spec/core/encoding/undefined_conversion_error/error_char_spec.rb