Created
September 17, 2012 19:21
-
-
Save tacoman667/3739230 to your computer and use it in GitHub Desktop.
wtf?!
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
class Admin::CampusesController < Admin::BaseController | |
def index | |
setup_and_render_index() | |
end | |
def setup_and_render_index | |
@campuses = Campus.all | |
render :index | |
end | |
end |
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
Failure/Error: @controller.should_receive(:setup_and_render_index) | |
(#<Admin::CampusesController:0x007fa7758c6300>).setup_and_render_index(any args) | |
expected: 1 time | |
received: 0 times |
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 "GET 'index'" do | |
it 'assigns @campuses instance variable' do | |
@controller.should_receive(:setup_and_render_index) | |
get 'index' | |
# assigns(:campuses).should eq(Campus.all) | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment