Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8953585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:07:49+00:00 2026-06-15T14:07:49+00:00

In config/routes.rb: match ‘app_config/:version’ => application#appconfig test/functional/application_controller_test.rb: require ‘test_helper’ class ApplicationControllerTest < ActionController::TestCase test

  • 0

In config/routes.rb:

match 'app_config/:version' => "application#appconfig"

test/functional/application_controller_test.rb:

require 'test_helper'
class ApplicationControllerTest < ActionController::TestCase
  test "app config" do
    get "/app_config/v2"
    assert_response :success
  end
end

rake test:

  1) Error:
test_app_config(ApplicationControllerTest):
ActionController::RoutingError: No route matches {:controller=>"application", :action=>"/app_config/v2"}

but $ curl localhost:3000/app_config/v2 works, and returns the response I expect, and rake routes shows the route as expected. Any idea what’s going on, or how to investigate further? This is basically the only code in the project.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:07:51+00:00Added an answer on June 15, 2026 at 2:07 pm

    The get method does not take a route. It takes an action name and a parameter’s hash.

    If you want to test the action, your tests should look like this:

    test "for success" do
      get :appconfig, :version => "v2"
      assert_response :success
    end
    

    If you want to test routing there is a tutorial here in the documentation.

    test "should route to appconfig" do
      assert_routing '/app_config/v2', { :controller => "application", :action => "appconfig", :version => "v2" }
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have... /config/routes.rb: Testivate::Application.routes.draw do resources :areas do resources :heuristics end end /app/models/heuristic.rb: class
I have... /config/routes.rb: Testivate::Application.routes.draw do resources :areas do resources :heuristics end end /app/models/heuristic.rb: class
I have Rails application with mounted Engine. #{main_app}/config/routes.rb mount CommentIt::Engine => /talk, :as =>
I have the following line in my config/routes.rb : match /assets/:id => assets#my_action I
In my config > routes I have: #Service Routes match services => services#index match
In particular I have the following in the app's config/routes.rb file: match /:id =>
In config/routes.php <?php return array( 'account/profile/change_password' => 'users/account/change_password', ); I can access site.com/users/account/change_password and
What I'd like to be able to do is: in config/routes.rb resources :posts in
ok i got this problem. i have this routes: (code bit change) File:/home/dotcloud/current/config/routes.js exports.routes
I am having a little trouble understanding what config/routes actually routes to. For example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.