Module: Itest5ch::AssertMethods
- Included in:
- Thread
- Defined in:
- lib/itest5ch/assert_methods.rb
Instance Method Summary collapse
Instance Method Details
#assert_required!(name, value) ⇒ Object
17 18 19 |
# File 'lib/itest5ch/assert_methods.rb', line 17 def assert_required!(name, value) raise ArgumentError, "#{name} is required" unless value end |
#assert_required_keys!(hash, *keys) ⇒ Object
7 8 9 10 11 |
# File 'lib/itest5ch/assert_methods.rb', line 7 def assert_required_keys!(hash, *keys) keys.each do |key| assert_required!(key, hash[key]) end end |