robin / chitsheet

cheat sheet repository for chit

chitsheet / assert_nothing_thrown.yml
100644 14 lines (9 sloc) 0.238 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---
assert_nothing_thrown: |-
  # 'cheat assertions' for the rest
  
  assert_nothing_thrown(message="", &proc)
  
  Passes if block does not throw anything.
  
  Example:
  
   assert_nothing_thrown do
     [1, 2].uniq
   end