Permalink
Browse files

document using render_template in view spec

  • Loading branch information...
1 parent 54fa767 commit 53cd78d49bacbbed8ce4979725bc675080a5a1df @dchelimsky dchelimsky committed Jun 19, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 README.markdown
View
@@ -132,6 +132,14 @@ Delegates to assert_redirect
View specs live in spec/views, and mix in ActionView::TestCase::Behavior.
+ describe "events/index.html.erb" do
+ it "renders _event partial for each event" do
+ assign(:events, [stub_model(Event), stub_model(Event)])
+ render
+ view.should render_template(:partial => "_event", :count => 2)
+ end
+ end
+
describe "events/show.html.erb" do
it "displays the event location" do
assign(:event, stub_model(Event,

0 comments on commit 53cd78d

Please sign in to comment.