spec/lib/abstractivator/cons_spec.rb in abstractivator-0.8.0 vs spec/lib/abstractivator/cons_spec.rb in abstractivator-0.10.0

- old
+ new

@@ -43,6 +43,13 @@ expect(list_to_enum(empty_list).to_a).to eql [] expect(list_to_enum(cons(1, cons(2, cons(3, empty_list)))).to_a).to eql [1, 2, 3] end end -end \ No newline at end of file + describe '#empty?' do + it 'determines whether or not the list is empty' do + expect(enum_to_list([1]).empty?).to be false + expect(empty_list.empty?).to be true + end + end + +end