summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/new_spec.rb
blob: 328455134eb308d3af3ad11d3cf724d6a23a335d (plain)
1
2
3
4
5
6
7
8
require_relative '../../spec_helper'
require 'stringio'

describe "StringIO.new" do
  it "warns when called with a block" do
    -> { eval("StringIO.new {}") }.should complain(/StringIO::new\(\) does not take block; use StringIO::open\(\) instead/)
  end
end