summaryrefslogtreecommitdiff
path: root/spec/ruby/library/matrix/each_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/matrix/each_spec.rb')
-rw-r--r--spec/ruby/library/matrix/each_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/ruby/library/matrix/each_spec.rb b/spec/ruby/library/matrix/each_spec.rb
index 18875692e6..b4bfd3c76f 100644
--- a/spec/ruby/library/matrix/each_spec.rb
+++ b/spec/ruby/library/matrix/each_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require 'matrix'
describe "Matrix#each" do
@@ -9,12 +9,12 @@ describe "Matrix#each" do
it "returns an Enumerator when called without a block" do
enum = @m.each
- enum.should be_an_instance_of(Enumerator)
+ enum.should.instance_of?(Enumerator)
enum.to_a.should == @result
end
it "returns self" do
- @m.each{}.should equal(@m)
+ @m.each{}.should.equal?(@m)
end
it "yields the elements starting with the those of the first row" do
@@ -31,15 +31,15 @@ describe "Matrix#each with an argument" do
end
it "raises an ArgumentError for unrecognized argument" do
- lambda {
+ -> {
@m.each("all"){}
- }.should raise_error(ArgumentError)
- lambda {
+ }.should.raise(ArgumentError)
+ -> {
@m.each(nil){}
- }.should raise_error(ArgumentError)
- lambda {
+ }.should.raise(ArgumentError)
+ -> {
@m.each(:left){}
- }.should raise_error(ArgumentError)
+ }.should.raise(ArgumentError)
end
it "yields the rights elements when passed :diagonal" do