Sha256: 6b741ea4ca4fc95f6cb17e3c014ae098e4bff443fba99429b51d41b9a920df59

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

require 'minitest_helper'

describe ClassAncestrySort do

  let(:classes) { [NoMethodError, StandardError, ArgumentError, NameError, StandardError, Exception, RuntimeError] }
  
  it 'Ascending' do
    ClassAncestrySort.asc(classes).must_equal [Exception, StandardError, NameError, NoMethodError, ArgumentError, RuntimeError]
  end

  it 'Descending' do
    ClassAncestrySort.desc(classes).must_equal [RuntimeError, ArgumentError, NoMethodError, NameError, StandardError, Exception]
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
class_ancestry_sort-0.1.0 spec/sort_spec.rb