diff options
author | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/matrix/vector | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/matrix/vector')
4 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/library/matrix/vector/cross_product_spec.rb b/spec/ruby/library/matrix/vector/cross_product_spec.rb index 5194782edd..c2698ade4c 100644 --- a/spec/ruby/library/matrix/vector/cross_product_spec.rb +++ b/spec/ruby/library/matrix/vector/cross_product_spec.rb @@ -7,7 +7,7 @@ describe "Vector#cross_product" do end it "raises an error unless both vectors have dimension 3" do - lambda { + -> { Vector[1, 2, 3].cross_product(Vector[0, -4]) }.should raise_error(Vector::ErrDimensionMismatch) end diff --git a/spec/ruby/library/matrix/vector/each2_spec.rb b/spec/ruby/library/matrix/vector/each2_spec.rb index 844b903336..10d2fc404d 100644 --- a/spec/ruby/library/matrix/vector/each2_spec.rb +++ b/spec/ruby/library/matrix/vector/each2_spec.rb @@ -8,8 +8,8 @@ describe "Vector.each2" do end it "requires one argument" do - lambda { @v.each2(@v2, @v2){} }.should raise_error(ArgumentError) - lambda { @v.each2(){} }.should raise_error(ArgumentError) + -> { @v.each2(@v2, @v2){} }.should raise_error(ArgumentError) + -> { @v.each2(){} }.should raise_error(ArgumentError) end describe "given one argument" do @@ -20,8 +20,8 @@ describe "Vector.each2" do end it "raises a DimensionMismatch error if the Vector size is different" do - lambda { @v.each2(Vector[1,2]){} }.should raise_error(Vector::ErrDimensionMismatch) - lambda { @v.each2(Vector[1,2,3,4]){} }.should raise_error(Vector::ErrDimensionMismatch) + -> { @v.each2(Vector[1,2]){} }.should raise_error(Vector::ErrDimensionMismatch) + -> { @v.each2(Vector[1,2,3,4]){} }.should raise_error(Vector::ErrDimensionMismatch) end it "yields arguments in sequence" do diff --git a/spec/ruby/library/matrix/vector/inner_product_spec.rb b/spec/ruby/library/matrix/vector/inner_product_spec.rb index 584226c450..1cf8771e04 100644 --- a/spec/ruby/library/matrix/vector/inner_product_spec.rb +++ b/spec/ruby/library/matrix/vector/inner_product_spec.rb @@ -11,7 +11,7 @@ describe "Vector#inner_product" do end it "raises an error for mismatched vectors" do - lambda { + -> { Vector[1, 2, 3].inner_product(Vector[0, -4]) }.should raise_error(Vector::ErrDimensionMismatch) end diff --git a/spec/ruby/library/matrix/vector/normalize_spec.rb b/spec/ruby/library/matrix/vector/normalize_spec.rb index 4ff9597c82..527c9260de 100644 --- a/spec/ruby/library/matrix/vector/normalize_spec.rb +++ b/spec/ruby/library/matrix/vector/normalize_spec.rb @@ -8,10 +8,10 @@ describe "Vector#normalize" do end it "raises an error for zero vectors" do - lambda { + -> { Vector[].normalize }.should raise_error(Vector::ZeroVectorError) - lambda { + -> { Vector[0, 0, 0].normalize }.should raise_error(Vector::ZeroVectorError) end |