Created
April 25, 2012 09:26
-
-
Save jakcharlton/2488466 to your computer and use it in GitHub Desktop.
Simple controller mock
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
it "assigns all organisations as @organisations" do | |
org = double(Organisation) | |
org.stub!(:all).and_return([org]) | |
get :index, {}, valid_session | |
assigns(:organisations).should eq([org]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment