Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe "get index" do
- as_a(:visitor) {it_should_redirect_to {new_session_path}}
- as_a(:user) {it_should_render_template.permission_denied}
- as_an :admin do
- before do
- @articles = [Article.new, Article.new]
- stub(Article).find(:all) {@articles}
- end
- it_should_render_view Admin::Articles::Index
- it_should_render_layout Layouts::Admin
- it_should_set_rendered_view.articles.to {@articles}
- end
- end
Add Comment
Please, Sign In to add comment