-
Notifications
You must be signed in to change notification settings - Fork 359
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
Add the ability to configure a host #74
Comments
Could you give an example of how you're currently using it, then how you would like to to be? I'm not sure I entirely understand. |
In the example block below, in my require 'spec_helper'
require 'rspec_api_documentation/dsl'
resource 'Albums' do
parameter :auth_token, 'Authentication token'
let(:user){ create(:user) }
let(:photo){ create(:photo, user: user) }
let(:auth_token){ user.authentication_token }
get 'https://app.example.com/api/v1/albums.json' do
before do
create(:album, user: user)
end
example_request 'List Albums' do
status.should == 200
response_json = JSON.parse(response_body)
response_json['errors'].should be_empty
albums = response_json['data']
albums.any?{ |album| album['name'] == 'Example Album' }.should be_true
end
end
end |
I'm not entirely sure how to get around this. I think we have to mess with the |
When an API only responds to calls on a given subdomain, it seems the full url must be specified in the example group. It would be preferable to specify the api host in the configuration instead.
The text was updated successfully, but these errors were encountered: