robin / chitsheet

cheat sheet repository for chit

This URL has Read+Write access

chitsheet / assert_not_nil.yml
100644 12 lines (7 sloc) 0.201 kb
1
2
3
4
5
6
7
8
9
10
11
12
---
assert_not_nil: |-
  # 'cheat assertions' for the rest
  
  assert_not_nil(object, message="")
  
  Passes if ! object .nil?
  
  Example:
  
    assert_not_nil '1 two 3'.sub!(/two/, '2')