diff options
Diffstat (limited to 'spec/ruby/library/stringio/new_spec.rb')
-rw-r--r-- | spec/ruby/library/stringio/new_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/library/stringio/new_spec.rb b/spec/ruby/library/stringio/new_spec.rb new file mode 100644 index 0000000000..ec4b32aa11 --- /dev/null +++ b/spec/ruby/library/stringio/new_spec.rb @@ -0,0 +1,10 @@ +require_relative '../../spec_helper' +require 'stringio' + +describe "StringIO.new" do + it "does not use the given block and warns to use StringIO::open" do + -> { + StringIO.new { raise } + }.should complain(/warning: StringIO::new\(\) does not take block; use StringIO::open\(\) instead/) + end +end |