Sha256: 6513daf9c3a3406a73e1cab5ded787d49ecf26257b05eee9bcad1e4956322178

Contents?: true

Size: 484 Bytes

Versions: 19

Compression:

Stored size: 484 Bytes

Contents

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

    subject{ type.name }

    context 'when provided' do
      let(:type){ SubType.new(intType, [positive], "Foo") }

      it 'uses the specified one' do
        expect(subject).to eq("Foo")
      end
    end

    context 'when not provided' do
      let(:type){ SubType.new(intType, [positive]) }

      it 'uses the first constraint name' do
        expect(subject).to eq("Positive")
      end
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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