diff options
Diffstat (limited to 'spec/ruby/core/encoding/converter/new_spec.rb')
| -rw-r--r-- | spec/ruby/core/encoding/converter/new_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/encoding/converter/new_spec.rb b/spec/ruby/core/encoding/converter/new_spec.rb index 6b9c76a093..6a6343012c 100644 --- a/spec/ruby/core/encoding/converter/new_spec.rb +++ b/spec/ruby/core/encoding/converter/new_spec.rb @@ -23,7 +23,7 @@ describe "Encoding::Converter.new" do end it "raises an Encoding::ConverterNotFoundError if both encodings are the same" do - lambda do + -> do Encoding::Converter.new "utf-8", "utf-8" end.should raise_error(Encoding::ConverterNotFoundError) end @@ -65,25 +65,25 @@ describe "Encoding::Converter.new" do obj = mock("encoding converter replacement") obj.should_receive(:to_str).and_return(1) - lambda do + -> do Encoding::Converter.new("us-ascii", "utf-8", replace: obj) end.should raise_error(TypeError) end it "raises a TypeError if passed true for the replacement object" do - lambda do + -> do Encoding::Converter.new("us-ascii", "utf-8", replace: true) end.should raise_error(TypeError) end it "raises a TypeError if passed false for the replacement object" do - lambda do + -> do Encoding::Converter.new("us-ascii", "utf-8", replace: false) end.should raise_error(TypeError) end it "raises a TypeError if passed a Fixnum for the replacement object" do - lambda do + -> do Encoding::Converter.new("us-ascii", "utf-8", replace: 1) end.should raise_error(TypeError) end |
