Last active
December 20, 2015 12:39
-
-
Save lazerwalker/6132709 to your computer and use it in GitHub Desktop.
Failing example for no_doc
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
resource 'No_Doc Test' do | |
get "/api/foo" do | |
example_request "should appear in docs" do | |
true.should be | |
end | |
example_request "should NOT appear in docs" do | |
no_doc do | |
true.should be | |
end | |
end | |
end | |
end |
no_doc
is supposed to allow requests to be made in a documented example and have those requests not be called.
So:
resource 'No_Doc Test' do
get "/api/foo" do
example "Documenting" do
no_doc do
client.get "/" # should not appear in docs
end
do_request # should appear in docs
client.get "/other_thing" # should appear in docs
end
end
end
In your example, @mchesler is correct, you want :document => false
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried the following?