From 28aa5f7fa6d7a37de6a4c348f19cf0a595cc2553 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 1 May 2020 19:34:24 +0900 Subject: Fixed a message and version guard then moved to the existing block --- spec/ruby/library/matrix/unitary_spec.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'spec') 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 -- cgit v1.2.3