-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from dcarneiro/accept_success_status
Accept success status
- Loading branch information
Showing
3 changed files
with
8 additions
and
7 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
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 |
---|---|---|
@@ -1,15 1,17 @@ | ||
require 'spec_helper' | ||
|
||
describe Swagger::Docs::SwaggerDSL do | ||
|
||
subject { described_class.new() } | ||
|
||
describe "#response" do | ||
it "adds code, responseModel and message to response_messages" do | ||
subject.response(:ok, "Some sample text", "Tag") | ||
expect(subject.response_messages).to eq([{:code=>200, :responseModel=>"Tag", :message=>"Some sample text"}]) | ||
end | ||
end | ||
|
||
it "accept :success was an :ok status" do | ||
subject.response(:success, "Some sample text", "Tag") | ||
expect(subject.response_messages).to eq([{:code=>200, :responseModel=>"Tag", :message=>"Some sample text"}]) | ||
end | ||
end | ||
end | ||
|
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 |
---|---|---|
|
@@ -9,8 9,7 @@ Gem::Specification.new do |spec| | |
spec.authors = ["Rich Hollis"] | ||
spec.email = ["[email protected]"] | ||
spec.description = %q{Generates json files for rails apps to use with swagger-ui} | ||
spec.summary = %q{Generates swagger-ui json files for rails apps with APIs. You add the swagger DSL to your controller classes and then run one rake task to generate the json files. | ||
} | ||
spec.summary = %q{Generates swagger-ui json files for rails apps with APIs. You add the swagger DSL to your controller classes and then run one rake task to generate the json files.} | ||
spec.homepage = "https://github.com/richhollis/swagger-docs" | ||
spec.license = "MIT" | ||
|
||
|