Sha256: b0b0a08f4253a915635d59bb69de0322540fe1ce3edc28690f5584b160314e15
Contents?: true
Size: 1.11 KB
Versions: 19
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' module Finitio describe TypeFactory, "DSL#set" do let(:factory){ TypeFactory.new } shared_examples_for "The Set[Int] type" do it{ should be_a(SetType) } it 'should have the correct element type' do expect(subject.elm_type).to eq(intType) end end before do subject end context 'when used with a ruby class' do subject{ factory.set(Integer) } it_should_behave_like "The Set[Int] type" it 'should have the correct name' do expect(subject.name).to eq("{Integer}") end end context 'when used with a type' do subject{ factory.set(intType) } it_should_behave_like "The Set[Int] type" it 'should have the correct name' do expect(subject.name).to eq("{intType}") end end context 'when used with an explicit name' do subject{ factory.set(intType, "MySet") } it_should_behave_like "The Set[Int] type" it 'should have the correct name' do expect(subject.name).to eq("MySet") end end end end
Version data entries
19 entries across 19 versions & 1 rubygems