aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/string/append_spec.rb
blob: e0012576219eac6e80b9c0cb21787b9dd4db45e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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