diff options
author | Benoit Daloze <[email protected]> | 2020-05-03 12:28:29 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-05-03 12:28:29 +0200 |
commit | 5aaa75e7c1f4b7912c10ffdcb1cac581e20eda39 (patch) | |
tree | e1694f5a4a5558884b1b8f3890b186793e5e982f /spec/ruby/library/matrix/unitary_spec.rb | |
parent | f646d20aaeb8f02bcd3d0c5c3f5a372da654502a (diff) |
Update to ruby/spec@032ee74
Diffstat (limited to 'spec/ruby/library/matrix/unitary_spec.rb')
-rw-r--r-- | spec/ruby/library/matrix/unitary_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/library/matrix/unitary_spec.rb b/spec/ruby/library/matrix/unitary_spec.rb index c52f9d97d9..af4b2bb442 100644 --- a/spec/ruby/library/matrix/unitary_spec.rb +++ b/spec/ruby/library/matrix/unitary_spec.rb @@ -3,18 +3,18 @@ require 'matrix' describe "Matrix.unitary?" do it "returns false for non unitary matrices" do - Matrix[[0, 1], [1, 2]].unitary?.should == false - Matrix[[0, Complex(0, 2)], [Complex(0, 2), 0]].unitary?.should == false - Matrix[[1, 1, 0], [0, 1, 1], [1, 0, 1]].unitary?.should == false + Matrix[[0, 1], [1, 2]].should_not.unitary? + Matrix[[0, Complex(0, 2)], [Complex(0, 2), 0]].should_not.unitary? + Matrix[[1, 1, 0], [0, 1, 1], [1, 0, 1]].should_not.unitary? end it "returns true for unitary matrices" do - Matrix[[0, Complex(0, 1)], [Complex(0, 1), 0]].unitary?.should == true + Matrix[[0, Complex(0, 1)], [Complex(0, 1), 0]].should.unitary? end version_is((Matrix::const_defined?(:VERSION) ? Matrix::VERSION : "0.1.0"), "0.3.0") do it "returns true for unitary matrices with a Complex and a negative #imag" do - Matrix[[0, Complex(0, 1)], [Complex(0, -1), 0]].unitary?.should == true + Matrix[[0, Complex(0, 1)], [Complex(0, -1), 0]].should.unitary? end end |