summaryrefslogtreecommitdiff
path: root/spec/ruby/core/encoding/converter/convert_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/encoding/converter/convert_spec.rb')
-rw-r--r--spec/ruby/core/encoding/converter/convert_spec.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/ruby/core/encoding/converter/convert_spec.rb b/spec/ruby/core/encoding/converter/convert_spec.rb
index 8533af4565..c95e88a491 100644
--- a/spec/ruby/core/encoding/converter/convert_spec.rb
+++ b/spec/ruby/core/encoding/converter/convert_spec.rb
@@ -5,7 +5,7 @@ require_relative '../../../spec_helper'
describe "Encoding::Converter#convert" do
it "returns a String" do
ec = Encoding::Converter.new('ascii', 'utf-8')
- ec.convert('glark').should be_an_instance_of(String)
+ ec.convert('glark').should.instance_of?(String)
end
it "sets the encoding of the result to the target encoding" do
@@ -34,13 +34,12 @@ describe "Encoding::Converter#convert" do
it "raises UndefinedConversionError if the String contains characters invalid for the target encoding" do
ec = Encoding::Converter.new('UTF-8', Encoding.find('macCyrillic'))
- -> { ec.convert("\u{6543}".dup.force_encoding('UTF-8')) }.should \
- raise_error(Encoding::UndefinedConversionError)
+ -> { ec.convert("\u{6543}".dup.force_encoding('UTF-8')) }.should.raise(Encoding::UndefinedConversionError)
end
it "raises an ArgumentError if called on a finished stream" do
ec = Encoding::Converter.new('UTF-8', Encoding.find('macCyrillic'))
ec.finish
- -> { ec.convert("\u{65}") }.should raise_error(ArgumentError)
+ -> { ec.convert("\u{65}") }.should.raise(ArgumentError)
end
end