spec/depth/actions_spec.rb in depth-0.4.0 vs spec/depth/actions_spec.rb in depth-0.4.1

- old
+ new

@@ -191,9 +191,16 @@ route = ['$yo', 0, '$thing'] expect(subject.find(route, default: 'blah')).to eq 'blah' end end + context 'with a missing route should return nil' do + it 'should return nil' do + route = ['$yo', 0, '$thing', 3, '434'] + expect(subject.find(route)).to be_nil + end + end + it 'should let me find an existing value' do route = [['$and', :array], [0, :hash], ['#weather', :hash], ['something', :array]] expect(subject.find(route)).to eq [] end