require 'spec_helper' # describe ::Rubiks::AnnotatedNode do # # API # specify { subject.respond_to?(:from_hash) } # specify { subject.respond_to?(:to_hash) } # # context 'when parsed from a valid hash' do # subject { described_class.new.from_hash('name' => 'some_name') } # # its(:name) { should eq('some_name') } # # its(:to_hash) { should have_key('name') } # # 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