diff options
Diffstat (limited to 'spec/ruby/core/string/append_spec.rb')
| -rw-r--r-- | spec/ruby/core/string/append_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/ruby/core/string/append_spec.rb b/spec/ruby/core/string/append_spec.rb new file mode 100644 index 0000000000..8497ce8262 --- /dev/null +++ b/spec/ruby/core/string/append_spec.rb @@ -0,0 +1,14 @@ +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_error(ArgumentError) + -> { "hello".send(:<<, "one", "two") }.should raise_error(ArgumentError) + end +end |
