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.
Strip out non-ascii characters in the folder directory.
The big offender being "::" being in the resource description as it treats the folder like a URI. "Namespace::Model" => "namespace::model/". Closes zipmark#93
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
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,34 @@ | ||
Feature: Folder Structure | ||
Background: | ||
Given a file named "app.rb" with: | ||
""" | ||
class App | ||
def self.call(env) | ||
[200, {}, ["hello"]] | ||
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 | ||
end | ||
resource "Namespace::Greetings" do | ||
get "/greetings" do | ||
example_request "Greeting your favorite gem" do | ||
expect(status).to eq(200) | ||
end | ||
end | ||
end | ||
""" | ||
When I run `rspec app_spec.rb --require ./app.rb --format RspecApiDocumentation::ApiFormatter` | ||
|
||
Scenario: Folder structure does not contain :: | ||
When I open the index | ||
And I navigate to "Greeting your favorite gem" | ||
|
||
Then I should see the route is "GET /greetings" |
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