Skip to content

Commit 0659ef6

Browse files
committed
Move the #status DSL out of a delegate for easier future renaming
1 parent 2f1fe19 commit 0659ef6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/rspec_api_documentation/dsl/endpoint.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Endpoint
88
extend ActiveSupport::Concern
99
include Rack::Test::Utils
1010

11-
delegate :response_headers, :status, :response_status, :response_body, :to => :rspec_api_documentation_client
11+
delegate :response_headers, :response_status, :response_body, :to => :rspec_api_documentation_client
1212

1313
module ClassMethods
1414
def example_request(description, params = {}, &block)
@@ -91,6 +91,10 @@ def method
9191
example.metadata[:method]
9292
end
9393

94+
def status
95+
rspec_api_documentation_client.status
96+
end
97+
9498
def in_path?(param)
9599
path_params.include?(param)
96100
end

0 commit comments

Comments
 (0)