Module: Riot::Gear::PersistCookie
- Defined in:
- lib/riot/gear/context/persist_cookie.rb
Instance Method Summary collapse
-
#persist_cookie(cookie_name) ⇒ Riot::Assertion
Graft a cookie (name and value) from the last response onto the next and subsequent requests.
Instance Method Details
#persist_cookie(cookie_name) ⇒ Riot::Assertion
Graft a cookie (name and value) from the last response onto the next and subsequent requests. Only applies to multiple requests within a Context. For instance, if you log into your service, you will probably want to pass along whatever the session cookie was to the next request in the test.
context "Get new messages" do
base_uri "http://example.com"
post "/[email protected]&password=beepboopbop"
("example_session")
get "/user/messages.json"
asserts_status.equals(200)
asserts_json("messages").length(8)
end
25 26 27 28 29 30 31 |
# File 'lib/riot/gear/context/persist_cookie.rb', line 25 def () hookup do if = [] topic.({ => ["value"]}) end end end |