Sha256: 50254996c3272708732769a8862118d83c4bd002aa49b14f13db909459df64b7

Contents?: true

Size: 614 Bytes

Versions: 2

Compression:

Stored size: 614 Bytes

Contents

require 'spec_helper'
module Finitio
  describe Heading, "to_name" do

    subject{ Heading.new(attributes).to_name }

    context 'with no attribute' do
      let(:attributes){
        [ ]
      }

      it{ should eq('') }
    end

    context 'with one attribute' do
      let(:attributes){
        [ Attribute.new(:red, intType) ]
      }

      it{ should eq('red: intType') }
    end

    context 'with multiple attributes' do
      let(:attributes){
        [ Attribute.new(:red, intType), Attribute.new(:blue, floatType) ]
      }

      it{ should eq('red: intType, blue: floatType') }
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
finitio-0.4.1 spec/unit/heading/test_to_name.rb
finitio-0.4.0 spec/unit/heading/test_to_name.rb