diff options
| -rw-r--r-- | README.rdoc | 28 | ||||
| -rw-r--r-- | app/controllers/v1/licenses_controller.rb | 2 | ||||
| -rw-r--r-- | config/routes.rb | 57 | ||||
| -rw-r--r-- | spec/routing/licenses_routing_spec.rb | 7 |
4 files changed, 12 insertions, 82 deletions
diff --git a/README.rdoc b/README.rdoc deleted file mode 100644 index dd4e97e..0000000 --- a/README.rdoc +++ /dev/null @@ -1,28 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... - - -Please feel free to use a different markup language if you do not plan to run -<tt>rake doc:app</tt>. diff --git a/app/controllers/v1/licenses_controller.rb b/app/controllers/v1/licenses_controller.rb new file mode 100644 index 0000000..697daa9 --- /dev/null +++ b/app/controllers/v1/licenses_controller.rb @@ -0,0 +1,2 @@ +class V1::LicensesController +end diff --git a/config/routes.rb b/config/routes.rb index f9a308b..87a889f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,56 +1,5 @@ CodeChallengeMo::Application.routes.draw do - # The priority is based upon order of creation: first created -> highest priority. - # See how all your routes lay out with "rake routes". - - # You can have the root of your site routed with "root" - # root 'welcome#index' - - # Example of regular route: - # get 'products/:id' => 'catalog#view' - - # Example of named route that can be invoked with purchase_url(id: product.id) - # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase - - # Example resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Example resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Example resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Example resource route with more complex sub-resources: - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', on: :collection - # end - # end - - # Example resource route with concerns: - # concern :toggleable do - # post 'toggle' - # end - # resources :posts, concerns: :toggleable - # resources :photos, concerns: :toggleable - - # Example resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end + namespace :v1, path: 'v1' do + get 'licenses', to: 'licenses#index' + end end diff --git a/spec/routing/licenses_routing_spec.rb b/spec/routing/licenses_routing_spec.rb new file mode 100644 index 0000000..bc2d45d --- /dev/null +++ b/spec/routing/licenses_routing_spec.rb @@ -0,0 +1,7 @@ +require "spec_helper" + +describe 'v1/licenses' do + it "can route to the index action" do + expect({ get: 'v1/licenses' }).to route_to(controller: 'v1/licenses', action: 'index') + end +end |
