diff options
Diffstat (limited to 'spec/ruby/library/getoptlong/shared')
| -rw-r--r-- | spec/ruby/library/getoptlong/shared/get.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/ruby/library/getoptlong/shared/get.rb b/spec/ruby/library/getoptlong/shared/get.rb index 91a0fbaacc..8d24c4c255 100644 --- a/spec/ruby/library/getoptlong/shared/get.rb +++ b/spec/ruby/library/getoptlong/shared/get.rb @@ -49,16 +49,14 @@ describe :getoptlong_get, shared: true do it "raises a if an argument was required, but none given" do argv [ "--size" ] do - lambda { @opts.send(@method) }.should raise_error(GetoptLong::MissingArgument) + -> { @opts.send(@method) }.should.raise(GetoptLong::MissingArgument) end end - ruby_version_is "2.5" do - # https://bugs.ruby-lang.org/issues/13858 - it "returns multiline argument" do - argv [ "--size=\n10k\n" ] do - @opts.send(@method).should == [ "--size", "\n10k\n" ] - end + # https://bugs.ruby-lang.org/issues/13858 + it "returns multiline argument" do + argv [ "--size=\n10k\n" ] do + @opts.send(@method).should == [ "--size", "\n10k\n" ] end end end |
