Module: Riot::Gear::AssertsStatus
- Defined in:
- lib/riot/gear/context/asserts_status.rb
Instance Method Summary collapse
-
#asserts_status(response_name = nil) ⇒ Riot::Assertion
Generates an assertion that retrieves the status code from the last response.
Instance Method Details
#asserts_status(response_name = nil) ⇒ Riot::Assertion
Generates an assertion that retrieves the status code from the last response. If a response name is provided, that named response will be used instead. The status code will be an integer.
asserts_status.equals(200)
14 15 16 |
# File 'lib/riot/gear/context/asserts_status.rb', line 14 def asserts_status(response_name=nil) asserts("status code") { response(response_name).code } end |