Method: Test::Unit::Assertions#assert_response
- Defined in:
- lib/og/test/assertions.rb
#assert_response(options = {}) ⇒ Object
Check the status of the response.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/og/test/assertions.rb', line 21 def assert_response( = {}) unless .is_a? Hash = { :status => } end msg = [:msg] if status = .fetch(:status, :success) status = STATUS_MAP[status] if STATUS_MAP.has_key?(status) assert_status(status, msg) end end |