Move test routes definition from routes.rb to a test file
This commit is contained in:
parent
ec2004713e
commit
c9437524fb
@ -36,6 +36,4 @@ Asciinema::Application.routes.draw do
|
|||||||
get '/privacy' => 'pages#show', page: :privacy, as: :privacy
|
get '/privacy' => 'pages#show', page: :privacy, as: :privacy
|
||||||
get '/tos' => 'pages#show', page: :tos, as: :tos
|
get '/tos' => 'pages#show', page: :tos, as: :tos
|
||||||
get '/contributing' => 'pages#show', page: :contributing, as: :contributing
|
get '/contributing' => 'pages#show', page: :contributing, as: :contributing
|
||||||
|
|
||||||
get '/test/widget/:id' => 'test_widget#show' if Rails.env.test?
|
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
|
routes = proc do
|
||||||
|
get '/test/widget/:id' => 'test_widget#show'
|
||||||
|
end
|
||||||
|
|
||||||
|
Rails.application.routes.eval_block(routes)
|
||||||
|
|
||||||
class TestWidgetController < ActionController::Base
|
class TestWidgetController < ActionController::Base
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
Loading…
Reference in New Issue
Block a user