spec/hash_branch_spec.rb in compo-0.1.5 vs spec/hash_branch_spec.rb in compo-0.2.0
- old
+ new
@@ -1,14 +1,9 @@
require 'spec_helper'
require 'compo'
+require 'branch_shared_examples'
+require 'hash_composite_shared_examples'
describe Compo::HashBranch do
- describe '#initialize' do
- it 'initialises with no parent' do
- expect(subject.parent).to be_nil
- end
-
- it 'initialises with an ID function returning nil' do
- expect(subject.id).to be_nil
- end
- end
+ it_behaves_like 'a branch'
+ it_behaves_like 'a hash composite'
end