Created
February 23, 2011 05:32
-
-
Save yohfee/840064 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #spec/routing/pages_routing_spec.rb | |
| require 'spec_helper' | |
| describe 'routes to the pages controller' do | |
| describe 'GET root_path' do | |
| subject { {:get => root_path} } | |
| it { should be_routable } | |
| it { should route_to :controller => 'pages', :action => 'home' } | |
| end | |
| describe 'GET service_path' do | |
| subject { {:get => service_path} } | |
| it { should be_routable } | |
| it { should route_to :controller => 'pages', :action => 'service' } | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #config/routes.rb | |
| Hoge::Application.routes.draw do | |
| root :to => 'pages/home' | |
| match 'pages/service' => 'pages#service', :as => :service | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment