Created
July 31, 2009 15:13
-
-
Save pd/159262 to your computer and use it in GitHub Desktop.
This file contains 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
describe 'an ApplicationController spec', :shared => true do | |
before(:all) do | |
ActionController::Routing::Routes.draw do |map| | |
map.resources :foo | |
map.connect '/access', :controller => 'foo', :action => 'access', :conditions => { :method => :put } | |
map.login '/login', :controller => 'foo', :action => 'index' | |
end | |
end | |
after(:all) do | |
eval IO.read(RAILS_ROOT + '/config/routes.rb') | |
end | |
end | |
class FooController < ApplicationController | |
def index; render :text => 'foo'; end | |
end | |
describe ApplicationController do | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment