so I have a route api.gemstore.dev/gems (using pow) in the browser I get an empty array [] which is perfect, there isn't anything in the db yet, so I should get an empty array
in my rspec test I have
setup do
host! 'api.gemstore.dev'
end
test 'As a user, I want to get gems' do
get '/gems', {}, { 'Accept' => Mime::JSON }
assert_equal 200, response.status
assert_equal Mime::JSON, response.content_type
end
routes
namespace :api, path: '/', constraints: { subdomain: 'api' } do
resources :gems
end
rake routes
Prefix Verb URI Pattern Controller#Action
api_gems GET /gems(.:format) api/gems#index {:subdomain=>"api"}
POST /gems(.:format) api/gems#create {:subdomain=>"api"}
new_api_gem GET /gems/new(.:format) api/gems#new {:subdomain=>"api"}
edit_api_gem GET /gems/:id/edit(.:format) api/gems#edit {:subdomain=>"api"}
api_gem GET /gems/:id(.:format) api/gems#show {:subdomain=>"api"}
PATCH /gems/:id(.:format) api/gems#update {:subdomain=>"api"}
PUT /gems/:id(.:format) api/gems#update {:subdomain=>"api"}
DELETE /gems/:id(.:format) api/gems#destroy {:subdomain=>"api"}
root GET / static#index
but this comes back with a no route matches error
let me know if you need more info, happy to provide, just not sure what to provide