Sha256: 496e8116a2647a034819e29e584033fbdb92f0906e348804e47bd43f6b5317b1

Contents?: true

Size: 485 Bytes

Versions: 3

Compression:

Stored size: 485 Bytes

Contents

require 'spec_helper'
module Qrb
  describe TypeFactory, "Factory#builtin" do

    let(:factory){ TypeFactory.new }

    context 'when use with a ruby class' do
      subject{ factory.type(Integer) }

      it{ should eq(intType) }
    end

    context 'when use with a ruby class and a name' do
      subject{ factory.type(Integer, "Int") }

      it{ should eq(intType) }

      it 'should have the correct name' do
        subject.name.should eq("Int")
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qrb-0.3.0 spec/unit/type_factory/factory/test_builtin.rb
qrb-0.2.0 spec/unit/type_factory/factory/test_builtin.rb
qrb-0.1.0 spec/unit/type_factory/factory/test_builtin.rb