spec/index_spec.rb in eternity-0.0.5 vs spec/index_spec.rb in eternity-0.1.0
- old
+ new
@@ -71,6 +71,18 @@
index.id.wont_equal index_2.id
index.to_h.must_equal index_2.to_h
end
+ it 'In memory instances' do
+ Index.all.must_be_empty
+
+ index_1 = Index.new 'index_1'
+ index_1[:countries].insert 'AR', name: 'Argentina'
+
+ index_2 = Index.new 'index_2'
+ index_2[:countries].insert 'UY', name: 'Uruguay'
+
+ Index.all.map(&:name).sort.must_equal %w(index_1 index_2)
+ end
+
end
\ No newline at end of file