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.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/ruby/core/array/append_spec.rb b/spec/ruby/core/array/append_spec.rb
index 90e1688c5a..c12473dc07 100644
--- a/spec/ruby/core/array/append_spec.rb
+++ b/spec/ruby/core/array/append_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/push', __FILE__)
+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
@@ -30,13 +30,11 @@ describe "Array#<<" do
a.should == [:foo]
end
- it "raises a RuntimeError on a frozen array" do
- lambda { ArraySpecs.frozen_array << 5 }.should raise_error(RuntimeError)
+ it "raises a FrozenError on a frozen array" do
+ -> { ArraySpecs.frozen_array << 5 }.should raise_error(FrozenError)
end
end
-ruby_version_is "2.5" do
- describe "Array#append" do
- it_behaves_like(:array_push, :append)
- end
+describe "Array#append" do
+ it_behaves_like :array_push, :append
end