summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/append_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/append_spec.rb')
-rw-r--r--spec/ruby/core/array/append_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/ruby/core/array/append_spec.rb b/spec/ruby/core/array/append_spec.rb
index c12473dc07..5480d9f65e 100644
--- a/spec/ruby/core/array/append_spec.rb
+++ b/spec/ruby/core/array/append_spec.rb
@@ -1,6 +1,5 @@
require_relative '../../spec_helper'
require_relative 'fixtures/classes'
-require_relative 'shared/push'
describe "Array#<<" do
it "pushes the object onto the end of the array" do
@@ -10,8 +9,8 @@ describe "Array#<<" do
it "returns self to allow chaining" do
a = []
b = a
- (a << 1).should equal(b)
- (a << 2 << 3).should equal(b)
+ (a << 1).should.equal?(b)
+ (a << 2 << 3).should.equal?(b)
end
it "correctly resizes the Array" do
@@ -31,10 +30,12 @@ describe "Array#<<" do
end
it "raises a FrozenError on a frozen array" do
- -> { ArraySpecs.frozen_array << 5 }.should raise_error(FrozenError)
+ -> { ArraySpecs.frozen_array << 5 }.should.raise(FrozenError)
end
end
describe "Array#append" do
- it_behaves_like :array_push, :append
+ it "is an alias of Array#push" do
+ Array.instance_method(:append).should == Array.instance_method(:push)
+ end
end