summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/at_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/at_spec.rb')
-rw-r--r--spec/ruby/core/array/at_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/array/at_spec.rb b/spec/ruby/core/array/at_spec.rb
index e40c26f2cc..3c7c99fdff 100644
--- a/spec/ruby/core/array/at_spec.rb
+++ b/spec/ruby/core/array/at_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "Array#at" do
it "returns the (n+1)'th element for the passed index n" do
@@ -15,7 +15,7 @@ describe "Array#at" do
a.at(7).should == nil
end
- it "returns the (-n)'th elemet from the last, for the given negative index n" do
+ it "returns the (-n)'th element from the last, for the given negative index n" do
a = [1, 2, 3, 4, 5, 6]
a.at(-1).should == 6
a.at(-2).should == 5
@@ -47,10 +47,10 @@ describe "Array#at" do
end
it "raises a TypeError when the passed argument can't be coerced to Integer" do
- lambda { [].at("cat") }.should raise_error(TypeError)
+ -> { [].at("cat") }.should.raise(TypeError)
end
- it "raises an ArgumentError when 2 or more arguments is passed" do
- lambda { [:a, :b].at(0,1) }.should raise_error(ArgumentError)
+ it "raises an ArgumentError when 2 or more arguments are passed" do
+ -> { [:a, :b].at(0,1) }.should.raise(ArgumentError)
end
end