summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/new_spec.rb
blob: ec4b32aa11264b2474fd47e0fbddaed13fc46210 (plain)
1
2
3
4
5
6
7
8
9
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