Sha256: 5cd2da4c2ca996e60e8613ffc9f1848d988e2a6e125c289fa0ead2408e9aaafe

Contents?: true

Size: 613 Bytes

Versions: 19

Compression:

Stored size: 613 Bytes

Contents

require 'spec_helper'
module Finitio
  describe AliasType, "delegation pattern" do

    let(:type){ AliasType.new(intType, 'Alias') }

    it 'should delegate hash' do
      expect(type.hash).to eq(intType.hash)
    end

    it 'should delegate ==' do
      expect(intType == type).to eq(true)
      expect(type == intType).to eq(true)
    end

    it 'should delegate dress' do
      expect(type.dress(12)).to eq(12)
    end

    it 'should delegate include?' do
      expect(type.include?(12)).to eq(true)
    end

    it 'should delegate to_s' do
      expect(type.to_s).to eq(intType.to_s)
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
finitio-0.12.0 spec/type/alias_type/test_delegation.rb
finitio-0.11.4 spec/type/alias_type/test_delegation.rb
finitio-0.11.3 spec/type/alias_type/test_delegation.rb
finitio-0.11.2 spec/type/alias_type/test_delegation.rb
finitio-0.11.1 spec/type/alias_type/test_delegation.rb
finitio-0.10.0 spec/type/alias_type/test_delegation.rb
finitio-0.9.1 spec/type/alias_type/test_delegation.rb
finitio-0.9.0 spec/type/alias_type/test_delegation.rb
finitio-0.8.0 spec/type/alias_type/test_delegation.rb
finitio-0.7.0 spec/type/alias_type/test_delegation.rb
finitio-0.7.0.pre.rc4 spec/type/alias_type/test_delegation.rb
finitio-0.7.0.pre.rc3 spec/type/alias_type/test_delegation.rb
finitio-0.7.0.pre.rc2 spec/type/alias_type/test_delegation.rb
finitio-0.7.0.pre.rc1 spec/type/alias_type/test_delegation.rb
finitio-0.6.1 spec/type/alias_type/test_delegation.rb
finitio-0.6.0 spec/type/alias_type/test_delegation.rb
finitio-0.5.2 spec/type/alias_type/test_delegation.rb
finitio-0.5.1 spec/type/alias_type/test_delegation.rb
finitio-0.5.0 spec/type/alias_type/test_delegation.rb