Skip to content

Commit a19a63e

Browse files
committed
Merge pull request #143 from Antek-drzewiecki/markdown_throw_fix
Fixed NoMethodError StandardError bug #142
2 parents 4635912 + 4c45192 commit a19a63e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* [#128](https://github.com/tim-vandecasteele/grape-swagger/pull/128): Combine global models and endpoint entities - [@dspaeth-faber](https://github.com/dspaeth-faber).
1717
* [#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).
1818
* [#135](https://github.com/tim-vandecasteele/grape-swagger/pull/135): Fixed model inclusion in models with aliased references - [@cdarne](https://github.com/cdarne).
19-
* [#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).
19+
* [#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).
2020
* Your Contribution Here
2121

2222
### 0.7.2 (February 6, 2014)

lib/grape-swagger/markdown.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Markdown
88
# The adapters are responsible of loading the required markdown dependencies and throw errors.
99
###
1010
def initialize(adapter)
11-
fail StandardError "The configured markdown adapter should implement a method #{ :markdown }." unless adapter.respond_to? :markdown
11+
fail(ArgumentError, "The configured markdown adapter should implement the method #{ :markdown }") unless adapter.respond_to? :markdown
1212
@adapter = adapter
1313
end
1414

spec/markdown/markdown_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
end
1212

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

0 commit comments

Comments
 (0)