Sha256: 3a5a3e49986785cae96af994ff54a7334f3041de23d775dca42facb440e4b05b

Contents?: true

Size: 566 Bytes

Versions: 5

Compression:

Stored size: 566 Bytes

Contents

require 'spec_helper'
module Alf
  describe Types do
    include Types

    describe "common_super_type" do

      it 'should work on same types' do
        common_super_type(String, String).should eq(String)
      end

      it 'should work with related types' do
        common_super_type(Fixnum, Integer).should eq(Integer)
        common_super_type(Fixnum, Float).should eq(Numeric)
      end

      it 'should work with un related types' do
        common_super_type(Fixnum, String).should eq(Object)
      end

    end

  end # describe Types
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-0.12.2 spec/unit/alf-core/types/test_class_methods.rb
alf-0.12.1 spec/unit/alf-core/types/test_class_methods.rb
alf-0.12.0 spec/unit/alf-core/types/test_class_methods.rb
alf-0.11.1 spec/unit/alf-core/types/test_class_methods.rb
alf-0.11.0 spec/unit/alf-core/types/test_class_methods.rb