summaryrefslogtreecommitdiff
path: root/spec/ruby/core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb')
-rw-r--r--spec/ruby/core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/ruby/core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb b/spec/ruby/core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb
new file mode 100644
index 0000000000..2f7f33e45e
--- /dev/null
+++ b/spec/ruby/core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb
@@ -0,0 +1,17 @@
+require File.expand_path('../../fixtures/classes', __FILE__)
+
+with_feature :encoding do
+ 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
+end