summaryrefslogtreecommitdiff
path: root/spec/ruby/core/encoding/shared/name.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/encoding/shared/name.rb')
-rw-r--r--spec/ruby/core/encoding/shared/name.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/core/encoding/shared/name.rb b/spec/ruby/core/encoding/shared/name.rb
new file mode 100644
index 0000000000..7f85c46764
--- /dev/null
+++ b/spec/ruby/core/encoding/shared/name.rb
@@ -0,0 +1,15 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe :encoding_name, shared: true do
+ it "returns a String" do
+ Encoding.list.each do |e|
+ e.send(@method).should be_an_instance_of(String)
+ end
+ end
+
+ it "uniquely identifies an encoding" do
+ Encoding.list.each do |e|
+ e.should == Encoding.find(e.send(@method))
+ end
+ end
+end