Created
November 4, 2012 00:38
-
-
Save paneq/4009602 to your computer and use it in GitHub Desktop.
HTTP Response chainable API :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_getters | |
ok = Response.new.http_version(v = 'HTTP/1.0').status(s = 300).headers({'X-Man' => xman = 'Summers'}).header("X-Angel", angel = "Warren").body(data = 'data') | |
assert_equal v, ok.http_version | |
assert_equal s, ok.status | |
assert_equal xman, ok.header("X-Man") | |
assert_equal angel, ok.header("X-Angel") | |
assert_equal data , ok.body | |
assert_equal 2, ok.headers.size | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment