Skip to content

Fixed NoMethodError StandardError bug #142 #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* [#128](https://github.com/tim-vandecasteele/grape-swagger/pull/128): Combine global models and endpoint entities - [@dspaeth-faber](https://github.com/dspaeth-faber).
* [#132](https://github.com/tim-vandecasteele/grape-swagger/pull/132): Addes support for enum values in entity documentation and form parameters - [@Antek-drzewiecki](https://github.com/Antek-drzewiecki).
* [#135](https://github.com/tim-vandecasteele/grape-swagger/pull/135): Fixed model inclusion in models with aliased references - [@cdarne](https://github.com/cdarne).
* [#142](https://github.com/tim-vandecasteele/grape-swagger/pull/142): Added support for kramdown, redcarpet and custom formatters - [@Antek-drzewiecki](https://github.com/Antek-drzewiecki).
* [#142](https://github.com/tim-vandecasteele/grape-swagger/pull/142), [#143](https://github.com/tim-vandecasteele/grape-swagger/pull/143): Added support for kramdown, redcarpet and custom formatters - [@Antek-drzewiecki](https://github.com/Antek-drzewiecki).
* Your Contribution Here

### 0.7.2 (February 6, 2014)
Expand Down
2 changes: 1 addition & 1 deletion lib/grape-swagger/markdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Markdown
# The adapters are responsible of loading the required markdown dependencies and throw errors.
###
def initialize(adapter)
fail StandardError "The configured markdown adapter should implement a method #{ :markdown }." unless adapter.respond_to? :markdown
fail(ArgumentError, "The configured markdown adapter should implement the method #{ :markdown }") unless adapter.respond_to? :markdown
@adapter = adapter
end

Expand Down
2 changes: 1 addition & 1 deletion spec/markdown/markdown_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
end

it 'raises an exception when the class does not respond to markdown' do
expect { GrapeSwagger::Markdown.new(Class.new) }.to raise_error(StandardError)
expect { GrapeSwagger::Markdown.new(Class.new) }.to raise_error(ArgumentError, 'The configured markdown adapter should implement the method markdown')
end
end

Expand Down