There was an error while loading. Please reload this page.
1 parent 8b6d6fd commit 9bd9081Copy full SHA for 9bd9081
3 files changed
core/encoding/name_spec.rb
@@ -1,6 +1,15 @@
1
require_relative "../../spec_helper"
2
-require_relative 'shared/name'
3
4
describe "Encoding#name" do
5
- it_behaves_like :encoding_name, :name
+ it "returns a String" do
+ Encoding.list.each do |e|
6
+ e.name.should.instance_of?(String)
7
+ end
8
9
+
10
+ it "uniquely identifies an encoding" do
11
12
+ e.should == Encoding.find(e.name)
13
14
15
end
core/encoding/shared/name.rb
core/encoding/to_s_spec.rb
@@ -1,6 +1,7 @@
describe "Encoding#to_s" do
- it_behaves_like :encoding_name, :to_s
+ it "is an alias of Encoding#name" do
+ Encoding.instance_method(:to_s).should == Encoding.instance_method(:name)
0 commit comments