Sha256: 62c55789d1a62a8bc578af374c21f31b77efef9cfab6a998448f8cc34d3ab6df

Contents?: true

Size: 355 Bytes

Versions: 2

Compression:

Stored size: 355 Bytes

Contents

require 'spec_helper'
module Finitio
  describe SubType, "initialize" do

    let(:c1){ ->(i){ i>0 } }
    let(:c2){ ->(i){ i<255 } }

    let(:sub){ SubType.new(intType, positive: c1, small: c2) }

    it 'sets the variable instances' do
      sub.super_type.should eq(intType)
      sub.constraints.should eq(positive: c1, small: c2)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
finitio-0.4.1 spec/unit/type/sub_type/test_initialize.rb
finitio-0.4.0 spec/unit/type/sub_type/test_initialize.rb