summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/push_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/push_spec.rb')
-rw-r--r--spec/ruby/core/array/push_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/array/push_spec.rb b/spec/ruby/core/array/push_spec.rb
index 562a6888dd..6255a84371 100644
--- a/spec/ruby/core/array/push_spec.rb
+++ b/spec/ruby/core/array/push_spec.rb
@@ -1,11 +1,11 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "Array#push" do
it "appends the arguments to the array" do
a = [ "a", "b", "c" ]
- a.push("d", "e", "f").should equal(a)
- a.push().should == ["a", "b", "c", "d", "e", "f"]
+ a.push("d", "e", "f").should.equal?(a)
+ a.push.should == ["a", "b", "c", "d", "e", "f"]
a.push(5)
a.should == ["a", "b", "c", "d", "e", "f", 5]
@@ -29,8 +29,8 @@ describe "Array#push" do
array.push(:last).should == [1, 'two', 3.0, array, array, array, array, array, :last]
end
- it "raises a RuntimeError on a frozen array" do
- lambda { ArraySpecs.frozen_array.push(1) }.should raise_error(RuntimeError)
- lambda { ArraySpecs.frozen_array.push }.should raise_error(RuntimeError)
+ it "raises a FrozenError on a frozen array" do
+ -> { ArraySpecs.frozen_array.push(1) }.should.raise(FrozenError)
+ -> { ArraySpecs.frozen_array.push }.should.raise(FrozenError)
end
end