Skip to content

Instantly share code, notes, and snippets.

@technicalpickles
Forked from qrush/gist:29084
Created November 25, 2008 20:58
Show Gist options
  • Save technicalpickles/29087 to your computer and use it in GitHub Desktop.
Save technicalpickles/29087 to your computer and use it in GitHub Desktop.
describe MakesController do
fixtures :users
integrate_views
describe "index should be visible to" do
# this is a macro that just pumps out three tests: log in anonymous, log in as a user, log in as an admin
it_should_behave_like "check all users"
before do
Make.delete_all
@makes = (1..10).map { Factory.create(:make) }
end
after do
get :index
response.should render_template(:index)
assigns(:makes).should == @makes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment