diff options
Diffstat (limited to 'spec/ruby/library/matrix/hash_spec.rb')
| -rw-r--r-- | spec/ruby/library/matrix/hash_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/library/matrix/hash_spec.rb b/spec/ruby/library/matrix/hash_spec.rb new file mode 100644 index 0000000000..27bf7b9751 --- /dev/null +++ b/spec/ruby/library/matrix/hash_spec.rb @@ -0,0 +1,15 @@ +require_relative '../../spec_helper' +require 'matrix' + +describe "Matrix#hash" do + + it "returns an Integer" do + Matrix[ [1,2] ].hash.should.instance_of?(Integer) + end + + it "returns the same value for the same matrix" do + data = [ [40,5], [2,7] ] + Matrix[ *data ].hash.should == Matrix[ *data ].hash + end + +end |
