setup_controller_spec.rb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:1k
- require File.dirname(__FILE__) + '/../spec_helper'
- describe 'GET setup with no configured blog' do
- controller_name :setup
- before(:each) do
- Blog.delete_all
- @blog = Blog.new.save
- end
- it 'renders index' do
- get 'index'
- response.should render_template('index')
- end
- end
- describe 'GET setup with a configured blog and some users' do
- controller_name :setup
- it 'redirects to login' do
- get 'index'
- response.should redirect_to(:controller => 'articles', :action => 'index')
- end
- end