Sha256: cbce2d6223010b5b978413b07bfd68e92d940d5cfe604b543d50132f09a2e634
Contents?: true
Size: 1.11 KB
Versions: 19
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' module Finitio describe TypeFactory, "DSL#seq" do let(:factory){ TypeFactory.new } shared_examples_for "The Seq[Int] type" do it{ should be_a(SeqType) } 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.seq(Integer) } it_should_behave_like "The Seq[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.seq(intType) } it_should_behave_like "The Seq[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.seq(intType, "MySeq") } it_should_behave_like "The Seq[Int] type" it 'should have the correct name' do expect(subject.name).to eq("MySeq") end end end end
Version data entries
19 entries across 19 versions & 1 rubygems