File tree 2 files changed +13
-2
lines changed
lib/rspec_api_documentation/dsl
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,7 @@ def query_string
52
52
end
53
53
54
54
def params
55
- return unless example . metadata [ :parameters ]
56
- parameters = example . metadata [ :parameters ] . inject ( { } ) do |hash , param |
55
+ parameters = example . metadata . fetch ( :parameters , { } ) . inject ( { } ) do |hash , param |
57
56
set_param ( hash , param )
58
57
end
59
58
parameters . merge! ( extra_params )
Original file line number Diff line number Diff line change 357
357
end
358
358
end
359
359
360
+ context "request with only extra params" do
361
+ post "/orders" do
362
+ context "extra options for do_request" do
363
+ before do
364
+ client . should_receive ( :post ) . with ( "/orders" , { "order_type" => "big" } , nil )
365
+ end
366
+
367
+ example_request "should take an optional parameter hash" , :order_type => "big"
368
+ end
369
+ end
370
+ end
371
+
360
372
context "last_response helpers" do
361
373
put "/orders" do
362
374
it "status" do
You can’t perform that action at this time.
0 commit comments