@@ -47,35 +47,35 @@ class StubApp < Sinatra::Base
4747    end 
4848
4949    it  "should handle xml data"  do 
50-       test_client . last_response_headers [ "Content-Type" ] . should  =~ /application\/ xml/ 
50+       test_client . response_headers [ "Content-Type" ] . should  =~ /application\/ xml/ 
5151    end 
5252
5353    it  "should log the request"  do 
5454      example . metadata [ :requests ] . first [ :response_body ] . should  be_present 
5555    end 
5656  end 
5757
58-   describe  "#last_query_string "  do 
58+   describe  "#query_string "  do 
5959    before  do 
6060      test_client . get  "/?query_string=true" 
6161    end 
6262
6363    it  'should contain the query_string'  do 
64-       test_client . last_query_string . should  == "query_string=true" 
64+       test_client . query_string . should  == "query_string=true" 
6565    end 
6666  end 
6767
68-   describe  "#last_query_hash "  do 
68+   describe  "#query_hash "  do 
6969    before  do 
7070      test_client . get  "/?query_hash=true" 
7171    end 
7272
7373    it  'should contain the query_hash'  do 
74-       test_client . last_query_hash . should  == {  "query_hash"  =>  "true"  } 
74+       test_client . query_hash . should  == {  "query_hash"  =>  "true"  } 
7575    end 
7676  end 
7777
78-   describe  "#last_request_headers "  do 
78+   describe  "#request_headers "  do 
7979    before  do 
8080      test_client . options [ :headers ]  =  { 
8181        "HTTP_ACCEPT"  =>  "application/json" , 
@@ -85,7 +85,7 @@ class StubApp < Sinatra::Base
8585    end 
8686
8787    it  "should contain all the headers"  do 
88-       test_client . last_request_headers . should  eq ( { 
88+       test_client . request_headers . should  eq ( { 
8989        "Accept"  =>  "application/json" , 
9090        "Content-Type"  =>  "application/json" , 
9191        "Host"  =>  "example.org" , 
@@ -101,22 +101,22 @@ class StubApp < Sinatra::Base
101101    end 
102102
103103    it  "can be overridden to add headers to the request"  do 
104-       test_client . last_request_headers [ "X-Custom-Header" ] . should  eq ( "custom header value" ) 
104+       test_client . request_headers [ "X-Custom-Header" ] . should  eq ( "custom header value" ) 
105105    end 
106106  end 
107107
108108  describe  "setup default headers"  do 
109109    it  "should let you set default headers when creating a new TestClient"  do 
110110      test_client  =  RspecApiDocumentation ::TestClient . new ( context ,  :headers  =>  {  "HTTP_MY_HEADER"  =>  "hello"  } ) 
111111      test_client . get  "/" 
112-       test_client . last_request_headers [ "My-Header" ] . should  == "hello" 
113-       test_client . last_request_headers . should  have ( 3 ) . headers 
112+       test_client . request_headers [ "My-Header" ] . should  == "hello" 
113+       test_client . request_headers . should  have ( 3 ) . headers 
114114    end 
115115
116116    it  "should be blank if not set"  do 
117117      test_client  =  RspecApiDocumentation ::TestClient . new ( context ) 
118118      test_client . get  "/" 
119-       test_client . last_request_headers . should  have ( 2 ) . headers 
119+       test_client . request_headers . should  have ( 2 ) . headers 
120120    end 
121121  end 
122122
0 commit comments