Sha256: 6944da206e22a6fd2e01d28a8af88b2a6f72efa5c750ba3dd9c508477bc441aa
Contents?: true
Size: 746 Bytes
Versions: 2
Compression:
Stored size: 746 Bytes
Contents
require 'spec_helper' module Finitio describe TypeFactory, "DSL#attribute" do let(:factory){ TypeFactory.new } shared_examples_for "The a:Integer attribute" do it{ should be_a(Attribute) } it 'should have the correct name' do subject.name.should eq(:a) end it 'should have the correct type' do subject.type.should eq(intType) end end context 'when used with a ruby class' do subject{ factory.attribute(:a, Integer) } it_should_behave_like "The a:Integer attribute" end context 'when used with a type' do subject{ factory.attribute(:a, intType) } it_should_behave_like "The a:Integer attribute" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
finitio-0.4.1 | spec/unit/type_factory/dsl/test_attribute.rb |
finitio-0.4.0 | spec/unit/type_factory/dsl/test_attribute.rb |