Method: #assert
- Defined in:
- src/ruby/pb/test/client.rb
#assert(msg = 'unknown cause') ⇒ Object
Fails with AssertionError if the block does evaluate to true
66 67 68 69 |
# File 'src/ruby/pb/test/client.rb', line 66 def assert(msg = 'unknown cause') fail 'No assertion block provided' unless block_given? fail AssertionError, msg unless yield end |