forked from zipmark/rspec_api_documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes undefining client_method when set to the same client_method
Issue zipmark#167
- Loading branch information
1 parent
d7a6961
commit eeaeb74
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Feature: Redefining the client method to the same method | ||
Background: | ||
Given a file named "app.rb" with: | ||
""" | ||
class App | ||
def self.call(env) | ||
[200, {}, ["Hello, world"]] | ||
end | ||
end | ||
""" | ||
And a file named "app_spec.rb" with: | ||
""" | ||
require "rspec_api_documentation" | ||
require "rspec_api_documentation/dsl" | ||
RspecApiDocumentation.configure do |config| | ||
config.app = App | ||
config.client_method = :client | ||
end | ||
resource "Example Request" do | ||
get "/" do | ||
example_request "Trying out get" do | ||
expect(status).to eq(200) | ||
end | ||
end | ||
end | ||
""" | ||
When I run `rspec app_spec.rb --require ./app.rb --format RspecApiDocumentation::ApiFormatter` | ||
|
||
Scenario: Output should have the correct error line | ||
Then the output should contain "1 example, 0 failures" | ||
And the exit status should be 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters