Sha256: f509ab738158dffed1adc19b2fdcc2174522467140821f5855567c5efd5602d3

Contents?: true

Size: 733 Bytes

Versions: 6

Compression:

Stored size: 733 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

include Fathom

describe DataCollection do
  it "should be a node" do
    DataCollection.ancestors.should be_include(Node)
  end
  
  it "should be a DiscreteNode as well" do
    DataCollection.ancestors.should be_include(DiscreteNode)
  end
  
  it "should be able to extract the discrete labels from the first discrete parent node added to it" do
    pr = PlausibleRange.new(:min => 0, :max => 1)
    dn = DiscreteNode.new(:labels => [1,2,3])
    dc = DataCollection.new(:parents => [pr, dn])
    dc.labels.should eql([1,2,3])
  end
  
  it "should enforce a name" do
    dc = DataCollection.new(:labels => [1,2,3])
    dc.name.should_not be_nil
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fathom-0.3.7 spec/fathom/node/data_collection_spec.rb
fathom-0.3.6 spec/fathom/node/data_collection_spec.rb
fathom-0.3.4 spec/fathom/node/data_collection_spec.rb
fathom-0.3.3 spec/fathom/node/data_collection_spec.rb
fathom-0.3.2 spec/fathom/node/data_collection_spec.rb
fathom-0.3.1 spec/fathom/node/data_collection_spec.rb