Sha256: f549063a3c0123e19bc73852a4cae1f332450c801075534647360af68888650e

Contents?: true

Size: 455 Bytes

Versions: 2

Compression:

Stored size: 455 Bytes

Contents

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

    subject{ type.name }

    context 'when not provided' do
      let(:type){ BuiltinType.new(Integer) }

      it 'uses the default name' do
        subject.should eq("Integer")
      end
    end

    context 'when provided' do
      let(:type){ BuiltinType.new(Integer, "int") }

      it 'uses the specified name' do
        subject.should eq("int")
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
finitio-0.4.1 spec/unit/type/builtin_type/test_name.rb
finitio-0.4.0 spec/unit/type/builtin_type/test_name.rb