Sha256: 634bf09eefd98a6edef88a719ae4e819c655a0c9a1a9905928cb2b9b11951980
Contents?: true
Size: 670 Bytes
Versions: 1
Compression:
Stored size: 670 Bytes
Contents
require 'spec_helper' # Mondrian level has: has_all, all_member_name, primary_key describe ::Rubiks::Hierarchy do include_context 'schema_context' subject { described_class.new_from_hash } specify { subject.respond_to?(:from_hash) } specify { subject.respond_to?(:to_hash) } specify { subject.respond_to?(:levels) } context 'when parsed from a valid hash' do subject { described_class.new_from_hash(hierarchy_hash) } its(:to_hash) { should have_key('levels') } it { should be_valid } end context 'when parsed from an invalid (empty) hash' do subject { described_class.new_from_hash({}) } it { should_not be_valid } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubiks-0.0.4 | spec/rubiks/nodes/hierarchy_spec.rb |