diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/matrix/lup_decomposition | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
download | ruby-5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0.tar.gz |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/matrix/lup_decomposition')
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/library/matrix/lup_decomposition/determinant_spec.rb b/spec/ruby/library/matrix/lup_decomposition/determinant_spec.rb index ca2ddf18c6..9d733066c1 100644 --- a/spec/ruby/library/matrix/lup_decomposition/determinant_spec.rb +++ b/spec/ruby/library/matrix/lup_decomposition/determinant_spec.rb @@ -13,7 +13,7 @@ describe "Matrix::LUPDecomposition#determinant" do Matrix[[7, 8], [14, 46], [28, 82]], ].each do |m| lup = m.lup - lambda { + -> { lup.determinant }.should raise_error(Matrix::ErrDimensionMismatch) end diff --git a/spec/ruby/library/matrix/lup_decomposition/initialize_spec.rb b/spec/ruby/library/matrix/lup_decomposition/initialize_spec.rb index 00dc47ddb9..36afb349e6 100644 --- a/spec/ruby/library/matrix/lup_decomposition/initialize_spec.rb +++ b/spec/ruby/library/matrix/lup_decomposition/initialize_spec.rb @@ -3,10 +3,10 @@ require 'matrix' describe "Matrix::LUPDecomposition#initialize" do it "raises an error if argument is not a matrix" do - lambda { + -> { Matrix::LUPDecomposition.new([[]]) }.should raise_error(TypeError) - lambda { + -> { Matrix::LUPDecomposition.new(42) }.should raise_error(TypeError) end diff --git a/spec/ruby/library/matrix/lup_decomposition/solve_spec.rb b/spec/ruby/library/matrix/lup_decomposition/solve_spec.rb index 43d49de9c7..66242627e9 100644 --- a/spec/ruby/library/matrix/lup_decomposition/solve_spec.rb +++ b/spec/ruby/library/matrix/lup_decomposition/solve_spec.rb @@ -6,7 +6,7 @@ describe "Matrix::LUPDecomposition#solve" do it "raises an error for singular matrices" do a = Matrix[[1, 2, 3], [1, 3, 5], [2, 5, 8]] lu = Matrix::LUPDecomposition.new(a) - lambda { + -> { lu.solve(a) }.should raise_error(Matrix::ErrNotRegular) end @@ -31,7 +31,7 @@ describe "Matrix::LUPDecomposition#solve" do it "raises an error when given a matrix of the wrong size" do values = Matrix[[1, 2, 3, 4], [0, 1, 2, 3]] - lambda { + -> { @lu.solve(values) }.should raise_error(Matrix::ErrDimensionMismatch) end @@ -44,7 +44,7 @@ describe "Matrix::LUPDecomposition#solve" do it "raises an error when given a vector of the wrong size" do values = Vector[14, 55] - lambda { + -> { @lu.solve(values) }.should raise_error(Matrix::ErrDimensionMismatch) end |