1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core/string/append_spec.rb
2022-03-28 17:47:04 +02:00

13 lines
446 B
Ruby

require_relative '../../spec_helper'
require_relative 'fixtures/classes'
require_relative 'shared/concat'
describe "String#<<" do
it_behaves_like :string_concat, :<<
it_behaves_like :string_concat_encoding, :<<
it "raises an ArgumentError when given the incorrect number of arguments" do
-> { "hello".send(:<<) }.should raise_error(ArgumentError)
-> { "hello".send(:<<, "one", "two") }.should raise_error(ArgumentError)
end
end