Sha256: 4cd4aa3b85e5a2398ee3d1ed260e0405b181774ed03ef9586972eb1617fa3a07
Contents?: true
Size: 864 Bytes
Versions: 1
Compression:
Stored size: 864 Bytes
Contents
require 'spec_helper' module Alf describe Heading do let(:h0){ Heading.new({}) } let(:h1){ Heading.new(:name => String) } let(:h2){ Heading.new(:name => String, :price => Float) } specify "cardinality" do h0.cardinality.should eq(0) h1.cardinality.should eq(1) h2.cardinality.should eq(2) end specify "to_hash" do h0.to_hash.should eq({}) h1.to_hash.should eq(:name => String) h2.to_hash.should eq(:name => String, :price => Float) end describe "EMPTY" do subject{ Heading::EMPTY } it_should_behave_like "A value" end describe "h0" do subject{ h0 } it { should == Heading::EMPTY } it_should_behave_like "A value" end describe "h1" do subject{ h1 } it_should_behave_like "A value" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alf-0.9.3 | spec/unit/test_heading.rb |