summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/append_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/append_spec.rb')
-rw-r--r--spec/ruby/core/string/append_spec.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/ruby/core/string/append_spec.rb b/spec/ruby/core/string/append_spec.rb
index 87b2dca725..e0f71b7c97 100644
--- a/spec/ruby/core/string/append_spec.rb
+++ b/spec/ruby/core/string/append_spec.rb
@@ -1,8 +1,14 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/concat', __FILE__)
+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_behaves_like :string_concat_type_coercion, :<<
+
+ it "raises an ArgumentError when given the incorrect number of arguments" do
+ -> { "hello".send(:<<) }.should.raise(ArgumentError)
+ -> { "hello".send(:<<, "one", "two") }.should.raise(ArgumentError)
+ end
end