Skip to content

Commit

Permalink
Move the #status DSL out of a delegate for easier future renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
oestrich committed Dec 16, 2014
1 parent 2f1fe19 commit 0659ef6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/rspec_api_documentation/dsl/endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0659ef6

Please sign in to comment.