diff --git a/lib/rspec_api_documentation/dsl/endpoint.rb b/lib/rspec_api_documentation/dsl/endpoint.rb index b30365e1..d10456bc 100644 --- a/lib/rspec_api_documentation/dsl/endpoint.rb +++ b/lib/rspec_api_documentation/dsl/endpoint.rb @@ -8,7 +8,7 @@ module Endpoint extend ActiveSupport::Concern include Rack::Test::Utils - delegate :response_headers, :status, :response_status, :response_body, :to => :rspec_api_documentation_client + delegate :response_headers, :response_status, :response_body, :to => :rspec_api_documentation_client module ClassMethods def example_request(description, params = {}, &block) @@ -91,6 +91,10 @@ def method example.metadata[:method] end + def status + rspec_api_documentation_client.status + end + def in_path?(param) path_params.include?(param) end