Move test routes definition from routes.rb to a test file

This commit is contained in:
Marcin Kulik 2013-12-09 23:16:41 +01:00
parent ec2004713e
commit c9437524fb
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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