diff options
Diffstat (limited to 'spec/ruby/library/matrix/row_size_spec.rb')
-rw-r--r-- | spec/ruby/library/matrix/row_size_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/library/matrix/row_size_spec.rb b/spec/ruby/library/matrix/row_size_spec.rb new file mode 100644 index 0000000000..ee685ba5fb --- /dev/null +++ b/spec/ruby/library/matrix/row_size_spec.rb @@ -0,0 +1,13 @@ +require File.expand_path('../../../spec_helper', __FILE__) +require 'matrix' + +describe "Matrix#row_size" do + it "returns the number rows" do + Matrix[ [1,2], [3, 4], [5, 6] ].row_size.should == 3 + end + + it "returns the number rows even for some empty matrices" do + Matrix[ [], [], [] ].row_size.should == 3 + end + +end |