diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-05-01 19:34:24 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-05-01 19:52:29 +0900 |
commit | 28aa5f7fa6d7a37de6a4c348f19cf0a595cc2553 (patch) | |
tree | 809ec35e7668c2a9ccdd08b139a658f72adc8035 /spec/ruby/library/matrix/unitary_spec.rb | |
parent | dc3bc425bb7fd505bd7ee45ff88246b528614004 (diff) |
Fixed a message and version guard then moved to the existing block
Diffstat (limited to 'spec/ruby/library/matrix/unitary_spec.rb')
-rw-r--r-- | spec/ruby/library/matrix/unitary_spec.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/ruby/library/matrix/unitary_spec.rb b/spec/ruby/library/matrix/unitary_spec.rb index c5b8cb6cee..69739a2cd2 100644 --- a/spec/ruby/library/matrix/unitary_spec.rb +++ b/spec/ruby/library/matrix/unitary_spec.rb @@ -8,14 +8,11 @@ describe "Matrix.unitary?" do Matrix[[1, 1, 0], [0, 1, 1], [1, 0, 1]].unitary?.should == false end - ruby_version_is '2.8' do # matrix v0.3.0 - it "returns true for non unitary matrix" do - Matrix[[0, Complex(0, 1)], [Complex(0, -1), 0]].unitary?.should == true - end - end - it "returns true for unitary matrices" do Matrix[[0, Complex(0, 1)], [Complex(0, 1), 0]].unitary?.should == true + version_is((Matrix::const_defined?(:VERSION) ? Matrix::VERSION : "0.1.0"), "0.3.0") do + Matrix[[0, Complex(0, 1)], [Complex(0, -1), 0]].unitary?.should == true + end end it "raises an error for rectangular matrices" do |